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. PageStack vs pageStackWindow element
Qt 6.11 is out! See what's new in the release blog

PageStack vs pageStackWindow element

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 3.9k 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.
  • T Offline
    T Offline
    Tslv
    wrote on last edited by
    #1
    1. Which one should I use and when/why?
    2. Does pageStackWindow contain pageStack? I mean does pageStackWindow instantiate pageStack element? Do I have to instantiate it myself? I guess I don't have to.
    3. Can I use both in Symbian and in MeeGo?

    More on pageStack
    http://doc.qt.nokia.com/qt-components-symbian/qml-pagestack.html

    More on pageStackWindow
    http://doc.qt.nokia.com/qtquick-components-symbian-1.1/qml-pagestackwindow.html

    Qt Video Tutorials
    http://www.youtube.com/user/MobileDevVT/videos
    More learning materials
    http://mobiledevvt.blogspot.com/

    1 Reply Last reply
    0
    • S Offline
      S Offline
      srikanth_trulyit
      wrote on last edited by
      #2

      "1. Which one should I use and when/why?"
      The docs has it all
      "Applications can be constructed using the PageStackWindow that brings the page navigation, statusbar, toolbar, and platform's common look and feel."

      "2. Does pageStackWindow contain pageStack? I mean does pageStackWindow instantiate pageStack element? Do I have to instantiate it myself? I guess I don’t have to"

      PageStack is a primitive way to manage stack of application pages. I suggest using PageStackWindow as it takes the extra effort of instantiating required application window components. You can access pagestack via pageStack property.

      "3. Can I use both in Symbian and in MeeGo?"
      Yes.

      Thanks,
      Srikanth

      1 Reply Last reply
      0
      • T Offline
        T Offline
        Tslv
        wrote on last edited by
        #3

        Hi Srikanth,
        Thanks for your answer. I wasn't sure which one of the two should I use. If pageStackWindow is newer I will use it instead.
        I got confused because most of the documentation uses pageStack in combination with window instead.
        The thing that is also bothering me is than when i use pageStackWindow and I change my orientation I get the error message:
        "ReferenceError: Can’t find variable: statusBar"
        When I use pageStack in combination with window I don't see this message.
        I have described this here:
        http://developer.qt.nokia.com/forums/viewthread/13189/

        Qt Video Tutorials
        http://www.youtube.com/user/MobileDevVT/videos
        More learning materials
        http://mobiledevvt.blogspot.com/

        1 Reply Last reply
        0
        • S Offline
          S Offline
          srikanth_trulyit
          wrote on last edited by
          #4

          Using PageStackWindow will do the combination of window and pageStack. PageStackWindow is introduced newly in QtQuick 1.1 hence most documents prior to it refer to 1.0 implementation.

          By the way, how are you accessing statusBar? It is not provided from PageStackWindow or Window.

          Thanks,
          Srikanth

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Tslv
            wrote on last edited by
            #5

            You can easly recreate this error. Just create new project using Qt Quick components. It will create Hello World app. When you run it and rotate the screen you will get this error in console view.
            “ReferenceError: Can’t find variable: statusBar”

            I haven't added any code. My main.qml look like this

            @import QtQuick 1.1
            import com.nokia.symbian 1.1

            PageStackWindow{
            id:window
            initalPage: MainPage {tools: toolBarLayout}
            showStatusBar:true
            showToolBar:true

            ToolBarLayout{ .... }

            }@

            If I comment out showStatusBar:true I have noticed I don't get this message anymore. Am I doing something wrong here?

            I am using Qt SDK 1.1.4.
            Qt Creator 2.4.0
            Based on Qt 4.7.4 (32 bit)
            Built on Dec 16 2011 at 03:25:42
            I have Windows 7 OS

            Qt Video Tutorials
            http://www.youtube.com/user/MobileDevVT/videos
            More learning materials
            http://mobiledevvt.blogspot.com/

            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