Qt Android. Get device screen resolution
问题 I'm developing in qt 5.3 on android device. I can't get the screen resolution. With the old qt 5 version this code worked: QScreen *screen = QApplication::screens().at(0); largh=screen->availableGeometry().width(); alt =screen->availableGeometry().height(); However now it doesn't work (returns a screen size 00x00). Is there another way to do it? thanks 回答1: Size holds the pixel resolution screen->size().width() screen->size().height(); Whereas, availableSize holds the size excluding window