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 to disable snapping/docking of QDockWidget to the centeral widget ?
Forum Updated to NodeBB v4.3 + New Features

How to disable snapping/docking of QDockWidget to the centeral widget ?

Scheduled Pinned Locked Moved Solved General and Desktop
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.
  • Q Offline
    Q Offline
    QtVik
    wrote on last edited by
    #1

    Hi,

    Basically i want all my QDockWidgets to remain floating(unDocked) always and shouldn't snap/dock to the central widget when I try to reposition it dragging using titleBar.
    How to achieve that ?

    Thanks

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

      Hi
      you can try with Qt::NoDockWidgetArea
      dockWidget->setAllowedAreas( Qt::NoDockWidgetArea );
      but not sure they can be there from start.

      Why use docks when you dont want to dock them?

      Q 2 Replies Last reply
      2
      • mrjjM mrjj

        Hi
        you can try with Qt::NoDockWidgetArea
        dockWidget->setAllowedAreas( Qt::NoDockWidgetArea );
        but not sure they can be there from start.

        Why use docks when you dont want to dock them?

        Q Offline
        Q Offline
        QtVik
        wrote on last edited by QtVik
        #3

        @mrjj Basically I want an option to set the dock widget to behave floating(unDocked) when i force it to remain unDocked irrespective of the position/movement .
        But i need an option for dock widget also if i want it to be.

        1 Reply Last reply
        0
        • mrjjM mrjj

          Hi
          you can try with Qt::NoDockWidgetArea
          dockWidget->setAllowedAreas( Qt::NoDockWidgetArea );
          but not sure they can be there from start.

          Why use docks when you dont want to dock them?

          Q Offline
          Q Offline
          QtVik
          wrote on last edited by
          #4

          @mrjj Thank you :)

          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