Results 1 to 3 of 3

Thread: StackView get index or views page

  1. #1
    Join Date
    Apr 2014
    Posts
    116
    Thanks
    8
    Qt products
    Qt5
    Platforms
    MacOS X

    Default StackView get index or views page

    Hi,

    I am trying to port an App form Sailfish to Android. Since Android does not provide push and pull menus I need to store my settings somewhere else. My plan was to use StackView with a tool bar. Within the toolbar I have a settings button that opens a context menu. This works but it always displays the menu from the main.qml. How can I adjust the menu so that I have a view specific menu?
    My plan was to somehow get the view "name" and adjust the main menu accordingly. But so far I was not able to figure out to get the view "name".

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: StackView get index or views page

    Could you provide an example of what you mean?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Apr 2014
    Posts
    116
    Thanks
    8
    Qt products
    Qt5
    Platforms
    MacOS X

    Default Re: StackView get index or views page

    I think I got it. After endless searching on Google I tried Bind and there I found my answer right away. Here someone asked the same thing.

    It took me some time to figure out the right syntax for the push argument.
    Qt Code:
    1. myStackView.push({item:Qt.resolveURL("URL"), properties:{objectName:"name"}})
    To copy to clipboard, switch view to plain text mode 

Similar Threads

  1. Any example of StackView?
    By stereoMatching in forum Qt Quick
    Replies: 1
    Last Post: 16th December 2013, 08:07
  2. Replies: 2
    Last Post: 12th December 2011, 21:29
  3. Load a simple Page after the Main Page.
    By mrhevor in forum Qt Quick
    Replies: 1
    Last Post: 27th September 2011, 10:32
  4. How can I support page up/page down on QTextEdit
    By wesley in forum Qt Programming
    Replies: 7
    Last Post: 14th September 2010, 19:18
  5. QTabWidget remove a page at the page's request
    By thomaspu in forum Qt Programming
    Replies: 2
    Last Post: 29th December 2007, 20:45

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.