Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How can I Implement collapse button for QDockWidget? (Code Please)
Qt 6.11 is out! See what's new in the release blog

How can I Implement collapse button for QDockWidget? (Code Please)

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 3.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.
  • M Offline
    M Offline
    MathSquare
    wrote on last edited by
    #1

    how can I Implement collapse button for QDockWidget like what is in Microsoft VB or Microsoft VS?

    P.S.

    NO third party tools, please. I use Gnu/Linux and my program is under the GPL.

    1 Reply Last reply
    0
    • Chris KawaC Offline
      Chris KawaC Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Subclass QDockWidget, add a QPushButton, hide/show stuff inside the dock and manipulate the dock's width/height when it's clicked. Not much to say about it I think?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Sam
        wrote on last edited by
        #3

        You can also have a look at "QPropertyAnimation Class":http://qt-project.org/doc/qt-5.0/qtcore/qpropertyanimation.html if you want to provide any animation effect.

        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