Results 1 to 4 of 4

Thread: How to stop autodocking for QDockWidget?

  1. #1
    Join Date
    Jul 2010
    Posts
    38
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default How to stop autodocking for QDockWidget?

    Hi friends,

    I want to stop the auto-docking of the dock-widget. Consider my mainwindow layout is like:

    Qt Code:
    1. ----------|------------------|
    2. Dock1 | |
    3. ----------| CENTRE |
    4. Dock2 | |
    5. ----------|------------------|
    To copy to clipboard, switch view to plain text mode 

    I want when I double click on the Dock2(make it float-able) then dock1 should not auto expand(i.e.make Dock2 place blank) similarly for vice-verse.

    I have tried with the setFeatures() function with the appropriate arguments but it does not work. I do not want to make the dockwidget fix as I want to resize it.

    What I am missing here?

    Thanks...

  2. #2
    Join Date
    Mar 2008
    Location
    Marslev, Denmark
    Posts
    31
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android

    Default Re: How to stop autodocking for QDockWidget?

    You can't do that. And I can't see why you would - empty space in a window is pointless.
    Bo Thorsen, Viking Software
    Qt applications on Linux and Windows

  3. #3
    Join Date
    Jul 2010
    Posts
    38
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to stop autodocking for QDockWidget?

    Thanks bothorsen for the reply...

    Actually want to give the option to the user to use "dock features" or not, that's why I want to do above one...

  4. #4
    Join Date
    Jan 2011
    Posts
    16
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to stop autodocking for QDockWidget?

    I actually wish that this feature or at least my interpretation existed. It would be nice to have a dock widget that did looked like it was floating all the time, but could be "docked" on some corner without changing the central widget size. Obviously, this would not make sense on many applications. However, it could on some cases and I will try to give a hypothetical example. In Google Earth or some kind of paint application, have a window docked in the bottom-right corner to perform some specific actions. This would not affect the full view of the center widget. I may even want the "docked" widget to not be movable, sizable, etc. However, when the window moves or resizes, the widget would still be in the bottom-right corner. Maybe something like this:

    Qt Code:
    1. |------------------|
    2. | |
    3. | CENTRAL |
    4. | |
    5. | |------|
    6. | | Dock |
    7. |------------------|
    To copy to clipboard, switch view to plain text mode 

    I do realize that this can be done with other methods. I am just saying it would be nice.

    Something else that is related: It would be VERY nice as well would be having the ability to
    Qt Code:
    1. setTitleBarWidget()
    To copy to clipboard, switch view to plain text mode 
    on more than just a QDockWidget, for example, a QMainWindow, QDialog, etc. Yes, this can also be done with other methods as well.

Similar Threads

  1. Replies: 1
    Last Post: 7th December 2010, 21:46
  2. Qt Creator Force Stop
    By Azraiyl in forum Qt Tools
    Replies: 5
    Last Post: 16th November 2010, 13:22
  3. how to stop QProcess in app.
    By manmohan in forum Newbie
    Replies: 5
    Last Post: 6th October 2010, 07:10
  4. How to stop QThread?
    By vespasianvs in forum Qt Programming
    Replies: 3
    Last Post: 14th March 2010, 06:42
  5. Stop the thread
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 14th May 2007, 10:29

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.