Ios/android: information about external display
-
Hi,
i am trying to get some information about an external display attached to an ios/android device. Everything i tried works fine if i deploy for desktop. But android-,ios device and ios simulator are always reporting only one display/screen.
Also the signal QDesktopWidget::screenCountChanged() works fine for desktop target, but not for ios/android.For the sake of simplicity one really short example:
@#include "mainwindow.h"
#include <QApplication>
#include <QLabel>
#include <QString>int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QLabel labl;
QString str = QString("%1 screen(s) detected!").arg(a.screens().count());
labl.setText(str);
labl.show();
return a.exec();
}
@Any help or pointers where i missed something would be greatly appreciated. Thanks.
Further Information:
I connect the iPad via lightning-digital-av-adapter+hdmi ("apple-store":http://store.apple.com/uk/product/MD826ZM/A/lightning-digital-av-adapter).
In the iOS-simulator i can attach a external display via the "hardware" menu.
For the android device its a microUSB-to-hdmi (MHL) adapter cable.To check if the hardware is the problem i wrote a little app in Xcode and tested the iPad and iOS-simulator. Both report the external display if its attached.
I used this class "UIScreen class":https://developer.apple.com/library/ios/documentation/uikit/reference/UIScreen_Class/Reference/UIScreen.html#//apple_ref/occ/clm/UIScreen/screens -
Hi and welcome to devnet,
I would say your use case is currently uncommon. How do you connect an external display to your iOS/Android device ?
-
Hey,
thanks.
I connect the iPad via lightning-digital-av-adapter+hdmi ("apple-store":http://store.apple.com/uk/product/MD826ZM/A/lightning-digital-av-adapter).
In the iOS-simulator i can attach a external display via the "hardware" menu.
For the android device its a microUSB-to-hdmi (MHL) adapter cable.To check if the hardware is the problem i wrote a little app in Xcode and tested the iPad and iOS-simulator. Both report the external display if its attached.
I used this class "UIScreen class":https://developer.apple.com/library/ios/documentation/uikit/reference/UIScreen_Class/Reference/UIScreen.html#//apple_ref/occ/clm/UIScreen/screensThanks for your help.
-
It's currently a missing feature (at least on iOS).
You should have a look at the "bug report system":http://bugreports.qt-project.org to see if it's something known, if not please open a new report.
-
Thank you for your support SGaist.
I'll see about the bug report this evening.
-
Don't forget to share the link to the report, so other people interested can find it more easily :)
-
Just realized i forgot to post the link...
For future reference:
"QTBUG-39244":https://bugreports.qt-project.org/browse/QTBUG-39244