QtonPi - Screen Dimensions / Reconnect HDMI
I downloaded the lastest QtonPi-Image and installed it. Everything works fine and the animations run great with only 30% CPU usage.
There are only two problems I need assistance with:
Is it possible to detect the screen height and width? (resolution of the screen)
I have to set width/height of my root element to fit the screen, otherwise it will be positioned bottom left and the rest of the screen is black. In main.cpp I use "view.showFullScreen();", but I still have to set the dimensions.
When I unplug the HDMI-Cable or turn off the screen and turn it on again, there is no signal. Is it possible to (re-)detect the HDMI-screen when pluggin in / turning on the screen? (Probably this is more a linux based problem?)
[quote author="neuni" date="1347451178"]... In main.cpp I use "view.showFullScreen();", but I still have to set the dimensions.
Have you tried setting "resizeMode":http://qt-project.org/doc/qt-4.8/qdeclarativeview.html#resizeMode-prop to "SizeRootObjectToView":http://qt-project.org/doc/qt-4.8/qdeclarativeview.html#ResizeMode-enum?
int main(int argc, char *argv)
QGuiApplication app(argc, argv);
view.setSource(QUrl(QCoreApplication::applicationDirPath() + "/qml/main.qml")); view.setResizeMode(QQuickView::SizeRootObjectToView); view.showFullScreen(); return app.exec();
Puristic...it's more JS and QML.
Did you ever get this to work? I'm having the same issue.
No, I never got this to work.
I used the bakepi-script to build my own raspbian/qt5 image. Now everything works fine.
The latest script is very easy to use: https://gitorious.org/bakeqtpi
There are also many messages regarding the script at this mailing list: