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. Showing and hiding pages of an application
Forum Updated to NodeBB v4.3 + New Features

Showing and hiding pages of an application

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 2.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.
  • T Offline
    T Offline
    talmage
    wrote on last edited by
    #1

    I need some help with the UI of a mobile application. I'm not sure if I'm about to use the correct QML terms to describe what I want to do.

    The application has three rectangles, A, B, and C, each of which fills the phone's screen. Each rectangle has two buttons corresponding to the other two rectangles. (e.g. rectangle A has buttons B and C). I want to be able to press button B on rectangle A and have rectangle B appear in place of rectangle A.

    Maybe I can use states to determine what to display.

    I'm not sure how to hide the rectangles that aren't displayed. I considered using z-ordering until I read somewhere about a performance bug related to z-order. Of course, I cannot find that bug report now. :-(

    What I would really like is to either tap or flick a button and have the corresponding rectangle slide out from one side of the screen to cover the original rectangle.

    As always, I will be grateful for any help you folks can offer.

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

      Hi there, would be best for you to check the code examples available in the SDK.
      As for this particular example I would use (for learning basically):
      Rectangle {
      id: rectangleA
      ...
      visible: true
      enabled: true
      }

      Then in states you can address particular rectangle by ids and change their visible/enabled properties...

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

        @cmer4: I appreciate your advice to check the samples in the SDK. I did that but couldn't find what I wanted. I also searched the Forum for examples. I didn't find help that way, either. I think that's because I don't know the terminology.

        Your solution works for me. Thank you.

        This morning, I stumbled on "Best way to make a game menu in Qt Quick":http://developer.qt.nokia.com/forums/viewthread/6040/ this morning. With what I learned there, I think I can make some nice transitions from one page to another.

        1 Reply Last reply
        0
        • C Offline
          C Offline
          cmer4
          wrote on last edited by
          #4

          heh David, don't worry - QML is fun, I study it for 2 months now and each day discover new great stuff;)!

          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