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. Drawer partially visible when closed
Forum Update on Tuesday, May 27th 2025

Drawer partially visible when closed

Scheduled Pinned Locked Moved QML and Qt Quick
qmldrawer dragmarg
4 Posts 2 Posters 1.0k 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.
  • X Offline
    X Offline
    XDePedro
    wrote on last edited by
    #1

    I want to have a Drawer or Drawer-like control in my application but when it's "closed" I want it to be partially visible.

    For instance imagine my drawer is a panel of 100 pixels when closed and then gets 200 pixels when opened.

    I'm trying to do that with a Drawer control but not able to do it. Can someone give me a clue of which control can I use.

    Thanks.

    1 Reply Last reply
    1
    • X Offline
      X Offline
      XDePedro
      wrote on last edited by
      #2

      Ok. Maybe I need to implement my own control for that. Does anybody know how to find the source code for the Drawer so that I can implement the effects/animations the same way??

      Thanks.

      1 Reply Last reply
      0
      • ODБOïO Offline
        ODБOïO Offline
        ODБOï
        wrote on last edited by
        #3

        hi,
        i'm not 100% sure this is it : https://code.woboq.org/qt5/qtquickcontrols2/src/quicktemplates2/qquickdrawer.cpp.html

        1 Reply Last reply
        1
        • X Offline
          X Offline
          XDePedro
          wrote on last edited by
          #4

          I implemented it by using a Popup control with two states expanded and collapsed and changing the modal property so that when is collapsed it is not modal and when is expanded is modal. Also I added a transition animation.

          The only thing I am missing is the "drag" feature...I am sure it can be done but is a bit more complex and probably I will not need this feature.

          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