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. [solved] porting Nokia apps to Qt5: Qt Quick Components and PageStack?
QtWS25 Last Chance

[solved] porting Nokia apps to Qt5: Qt Quick Components and PageStack?

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

    Now that Qt5 is almost ready, I want to port my Nokia N9 meego(Harmattan) app to run under Qt5.

    Nokia and Digia taught us to create QML apps for the N9 (and Symbian) using PageStack and other QML components, in the com.nokia.meego namespace. These were known as "Components" for QML Quick. I haven't yet found them in Qt5 beta 2.

    Is Digia planning to add them as an Add-On module? Or are there new equivalent components that we should be using instead?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      chrisadams
      wrote on last edited by
      #2

      Component sets are "per-platform" since they basically provide "platform look and feel" QML elements.
      As far as I know, official MeeGo QML components for Qt5 haven't yet been written. I'd be surprised if Symbian ones have been written or are being planned, as I don't think Qt5 works on Symbian.

      Digia are continuing to develop the "Desktop QML Components" which have native look-and-feel on Windows, MacOSX, and Linux. See "QtDesktopComponents":http://qt-project.org/wiki/QtDesktopComponents for information on that.

      Cheers,
      Chris.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dicksonleong
        wrote on last edited by
        #3

        I don't think that the Qt official team will port Qt 5 for Harmattan/Symbian. Though there is port of Qt 5 for Harmattan (and MeeGo Qt Quick Component) by community, so hopefully will be merge upstream.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          Rizzer
          wrote on last edited by
          #4

          Thanks Chris. That separation of components doesn't entirely make sense. I mean the idea makes sense, that specific visual elements should be handled separately. But the main one I'm looking for is the PageStack, which is a question of functionality, not appearance. Don't other platforms use pages to organise the way a QML app works? How are pages supposed to be handled in QML if there is no PageStack?

          The QtDesktopComponents link says it's now superseded by "Qt Quick Components":https://qt-project.org/wiki/Qt_Quick_Components. The "first link":https://bugreports.qt-project.org/browse/QTCOMPONENTS-72 in the references says Window and Pages are in and have been implemented, but they seem to have gotten lost in the current Qt Quick Components.

          Thanks Dickson. Building Qt5 apps for the N9 is a separate question, I'm sure it'll be made possible!

          1 Reply Last reply
          0
          • J Offline
            J Offline
            Jens
            wrote on last edited by
            #5

            This is outdated but might leave this here anyway. I am planning to add a pageStack to the desktop components and make them a bit more general purpose. For the time being you can actually copy the PageStack component directly from meego components (and port it to QtQuick 2.0). They are BSD licensed so it should not really be an issue.

            1 Reply Last reply
            0
            • R Offline
              R Offline
              Rizzer
              wrote on last edited by
              #6

              Thanks Jens. It'll be handy to have these components in. Sounds like copying the old versions will be an adequate workaround, if not too many code changes are needed.

              I do however get the impression that there is something more fundamental here that I'm missing. At the Nokia/Digia Qt workshop I attended, we were taught that the PageStack is the way to construct an app (one which is sufficiently complex to be made of several different pages). But if the PageStack component does not generally exist, then how are everyone else constructing their QML apps without it? Surely they're not all single screen apps with no need for separate pages?

              1 Reply Last reply
              0
              • J Offline
                J Offline
                Jens
                wrote on last edited by
                #7

                PageStack itself is constructed from more basic QtQuick primitives so making your own pagestack is certainly feasible. (You get half way just having a container with multiple listviews in them). Including it in the core components might also have been premature since for instance, we dont yet if it scales to IOS and Android. That said it was included in both the Symbian components and Meego components so I would expect it to be built into core Qt in some shape or form soon. Also keep in mind that on Desktop, Window and Dialog is a more common way of splitting up your application.

                1 Reply Last reply
                0
                • R Offline
                  R Offline
                  Rizzer
                  wrote on last edited by
                  #8

                  Thanks again. I'll take a closer look at Window and Dialog at the same time that I look at copying across PageStack for my app.

                  1 Reply Last reply
                  0
                  • P Offline
                    P Offline
                    Petteri
                    wrote on last edited by
                    #9

                    I am also porting my Harmattan apps to Qt5 and to Android. I see lot of traditional Android apps having the same kind of page view logic as in Harmattan and Symbian. Seems that Qt 5.1 still lacks PageStack that my apps were using, which would be perfect also for these android/Qt5 versions.

                    I would love to hear how people have handle the porting without PageStack?

                    1 Reply Last reply
                    0
                    • JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on last edited by
                      #10

                      PageStack still exists; it has just been renamed to "StackView":http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-stackview.html for consistency with other views (namely TabView, TableView, ScrollView, and SplitView)

                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                      1 Reply Last reply
                      0
                      • R Offline
                        R Offline
                        Rizzer
                        wrote on last edited by
                        #11

                        I see it, Qt 5.1 now has what we want (ApplicationWindow, StackView etc) in QtQuick.Controls 1.0 (module qtquickcontrols). My port is now underway.

                        1 Reply Last reply
                        0
                        • R Offline
                          R Offline
                          Rizzer
                          wrote on last edited by
                          #12

                          p.s. Might be worth mentioning, in Qt4 (Qt Quick 1) QtCreator added qmlapplicationviewer to start up the gui, with
                          @QScopedPointer<QmlApplicationViewer> viewer(QmlApplicationViewer::create());@
                          put into main.cpp.

                          QtQuick.Controls 1.0 needs QtQuick 2, which in turn needs qtquick2applicationviewer rather than qmlapplicationviewer, e.g.
                          @QScopedPointer<QtQuick2ApplicationViewer> viewer(new QtQuick2ApplicationViewer());@

                          But this actually conflicts with ApplicationWindow. Both ApplicationWindow and QtQuick2ApplicationViewer create a root window, so there is conflict over which window is to be used. Instead, to use ApplicationWindow, in main.cpp we should use QQmlApplicationEngine instead of QtQuick2ApplicationViewer, e.g.
                          @QScopedPointer<QQmlApplicationEngine> engine(new QQmlApplicationEngine());@
                          followed by
                          @ engine->load(QUrl("qrc:/qml/main.qml"));
                          QObject *topLevel = engine->rootObjects().value(0);
                          QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
                          window->show();@
                          instead of
                          @viewer->setSource(QUrl("qrc:/qml/main.qml"));
                          viewer->show();@

                          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