Portrait QML apps on N900?
-
Is there a way to view QML apps in portrait mode on Nokia N900 with current version of QMLViewer? It doesn't rotate automatically and the "Set orientation: Portrait" option doesn't do anything.
-
You have to tell your main.qml to resize the actual window size matching the orientation.
Maybe the "runtime":http://doc.qt.nokia.com/latest/qmlviewer.html#using-the-object object would help you for that.
-
Thanks for the replies. CTRL+Shift+R did the trick.
I am using @anchors.fill: parent@ so window resizes nicely when orientation is changed.
-
fcrochik: A bug report about what? I think I am missing the issue in this post:-(
-
If you create a C++ or Python wrapper for your QML app, you can use the Maemo 5-specific attributes "Qt::WA_Maemo5PortraitOrientation" and "Qt::WA_Maemo5AutoOrientation" on your QWidget (e.g. QDeclarativeView or QMainWindow), as described in this example:
http://gutenberg.troll.no/qt-maemo-4.7/maemo5-rotation.html
This way, you don't have to press Ctrl+Shift+R every time you start your application and you can force portrait-only mode if you want (Ctrl+Shift+R only enables auto-rotation). Obviously, this only applies if you are writing a small C++/Python wrapper and load your QML file in a QDeclarativeView, and not if you are only using the QML Viewer.
-
[quote author="fcrochik" date="1290810882"][quote author="Tobias Hunger" date="1290808104"]fcrochik: A bug report about what? I think I am missing the issue in this post:-([/quote]
That changing the orientation to portrait on the qml viewer running on the n900 does not have any effect.[/quote]
In this case the window resizes properly right. So how is this a bug?
-
[quote author="fcrochik" date="1291295735"]Does it? It doesn't on my n900 and I assume it didn't for Tommi either or he would not have started this thread.[/quote]
Report a bugs on bugs.maemo.org then on the package and post instructions on how to reliably reproduce the error :) (I guess the Maemo build of qmlviewer has a special component on bugs.maemo.org, but it could be the normal Qt bugtracker as well)