You can take a look at Qt.application.screens and detect by resolution along with Qt.platforms should be doable but I think the http://doc.qt.io/qt-5/qsysinfo.html QSysInfo will give you a better check and you can expose this to a property or Q_INVOKABLE function. It doesn't seem to have anything to display the phone model. So you can do an .mm obj-c call: [[UIDevice currentDevice] platformString] Should do the trick. Put this into a QString return value function QString::fromNString() and you should be good to go. You might need to stub this on other platform.
-----Original Message----- From: Interest <[email protected]> On Behalf Of Nuno Santos Sent: December 3, 2018 7:35 AM To: [email protected] Interest <[email protected]> Subject: [Interest] How to distinguish from iPhone screen type with Qt/Qml Hi, I’m trying to make my iOS apps ready for iPhone X screen as well as the new iPads. How can I distinguish the screen types? Can I do that directly from Qml? How? Thanks in advance! Regards, Nuno _______________________________________________ Interest mailing list [email protected] https://lists.qt-project.org/listinfo/interest _______________________________________________ Interest mailing list [email protected] https://lists.qt-project.org/listinfo/interest
