Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Portrait QML apps on N900?
Forum Updated to NodeBB v4.3 + New Features

Portrait QML apps on N900?

Scheduled Pinned Locked Moved QML and Qt Quick
12 Posts 6 Posters 6.4k Views 1 Watching
  • 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.
  • F Offline
    F Offline
    fcrochik
    wrote on last edited by
    #2

    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
    0
    • M Offline
      M Offline
      mutaphysis
      wrote on last edited by
      #3

      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
      0
      • T Offline
        T Offline
        tlaukkanen
        wrote on last edited by
        #4

        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
        0
        • F Offline
          F Offline
          fcrochik
          wrote on last edited by
          #5

          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
          0
          • T Offline
            T Offline
            tobias.hunger
            wrote on last edited by
            #6

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

            1 Reply Last reply
            0
            • F Offline
              F Offline
              fcrochik
              wrote on last edited by
              #7

              [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
              0
              • T Offline
                T Offline
                thp4
                wrote on last edited by
                #8

                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
                0
                • K Offline
                  K Offline
                  kamalakshantv
                  wrote on last edited by
                  #9

                  [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
                  0
                  • F Offline
                    F Offline
                    fcrochik
                    wrote on last edited by
                    #10

                    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
                    0
                    • T Offline
                      T Offline
                      thp4
                      wrote on last edited by
                      #11

                      [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
                      0
                      • F Offline
                        F Offline
                        fcrochik
                        wrote on last edited by
                        #12

                        @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
                        0

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved