Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Forum Updated on Feb 6th

    Portrait QML apps on N900?

    QML and Qt Quick
    6
    12
    5692
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      tlaukkanen last edited by

      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.

      My Blog: <a href="http://www.substanceofcode.com">substanceofcode.com</a>
      Twitter: <a href="http://twitter.com/tlaukkanen">twitter.com/tlaukkanen</a>

      1 Reply Last reply Reply Quote 0
      • F
        fcrochik last edited by

        After loading qml viewer you can press CTRL+Shift+R to force the autorotation.

        Another good option is to use qt creator 2.1 to create a simple wrapper around your qml application or just a generic "viewer" that will load any qml file.

        Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

        1 Reply Last reply Reply Quote 0
        • M
          mutaphysis last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • T
            tlaukkanen last edited by

            Thanks for the replies. CTRL+Shift+R did the trick.

            I am using @anchors.fill: parent@ so window resizes nicely when orientation is changed.

            My Blog: <a href="http://www.substanceofcode.com">substanceofcode.com</a>
            Twitter: <a href="http://twitter.com/tlaukkanen">twitter.com/tlaukkanen</a>

            1 Reply Last reply Reply Quote 0
            • F
              fcrochik last edited by

              Glad to hear. It is probably a good idea to file a bug report if there is none.

              Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

              1 Reply Last reply Reply Quote 0
              • T
                tobias.hunger last edited by

                fcrochik: A bug report about what? I think I am missing the issue in this post:-(

                1 Reply Last reply Reply Quote 0
                • F
                  fcrochik last edited by

                  [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.

                  Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                  1 Reply Last reply Reply Quote 0
                  • T
                    thp4 last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • K
                      kamalakshantv last edited by

                      [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?

                      1 Reply Last reply Reply Quote 0
                      • F
                        fcrochik last edited by

                        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.

                        Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                        1 Reply Last reply Reply Quote 0
                        • T
                          thp4 last edited by

                          [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)

                          1 Reply Last reply Reply Quote 0
                          • F
                            fcrochik last edited by

                            @thp: That was my suggestion to the author of this thread (with not so much detail I have to say... thanks for that)

                            Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

                            1 Reply Last reply Reply Quote 0
                            • First post
                              Last post