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. Make a QDockWidget "unresizable"

Make a QDockWidget "unresizable"

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 488 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.
  • D Offline
    D Offline
    DarkPatate
    wrote on last edited by
    #1

    Hello,
    I have a QMainWindows application with a QDockWidget on the top of my app. I use it as a Ribbon like in that GitHub : https://github.com/martijnkoopman/Qt-Ribbon-Widget
    But I would like to make the QDockWidget "unresizable", I want to fixe its size. I tried that (at the end of the main Windows constructor), but my widget got a null size :

    ui->ribbonDockWidget->setFixedHeight(ui->ribbonDockWidget->height());
    

    How can I remove the possibily to change the size between that QDockWidgets and the others. Actually it's more the possibility to adaptate the position of each QDockWidget, and I want to disable it for my Ribbon.

    Thanks in advance,
    DarkPatate

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Do you mean you want to make it unmovable/floatable/etc ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      0
      • D Offline
        D Offline
        DarkPatate
        wrote on last edited by
        #3

        I changed my QDockWidget in QToolBar to solve my problem. Moreover, it avoids others QDockWidget to be moved in the same place :)

        1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          Do you mean you want to make it unmovable/floatable/etc ?

          D Offline
          D Offline
          DarkPatate
          wrote on last edited by
          #4

          @SGaist I made it unmovable/floatable. but the possibility of change the size in relation to other QDockWdget was still allowed.

          But I found the solution, use a QToolBar to put my ribbon Inside. The size is fixed :)

          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