Results 1 to 5 of 5

Thread: dockWidget not undocking in centralWidget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,330
    Thanks
    317
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: dockWidget not undocking in centralWidget

    I know that, but I need to have a centralDock.
    No, you don't. You need a central widget to satisfy the requirements for using QMainWindow. You need to design a custom QWidget that has the layout and behavior you want and use that as the central widget. Just because a QDockWidget -looks- like something you could use, and just because you -can- add a layout directly to QMainWindow doesn't mean it is going to behave as you wish (but seem unwilling to accept).
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  2. #2
    Join Date
    May 2015
    Posts
    22
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: dockWidget not undocking in centralWidget

    I got it. I thought that this 'hack' would be efficient, but as you're saying, the QDockWidget will not work as a expect. Would you know how I could implement the dragging movement from scratch then?

Similar Threads

  1. DockWidgets with no centralWidget
    By drave in forum Newbie
    Replies: 2
    Last Post: 1st February 2017, 19:09
  2. Undocking Problem a Bug?
    By qtoptus in forum Qt Programming
    Replies: 7
    Last Post: 17th March 2014, 03:52
  3. Cant get QMainWindow().centralwidget....
    By tonnot in forum Newbie
    Replies: 2
    Last Post: 8th December 2011, 00:49
  4. Replies: 5
    Last Post: 30th November 2010, 06:40
  5. QDockWidget freezes desktop when undocking
    By pdolbey in forum Qt Programming
    Replies: 5
    Last Post: 12th March 2007, 14:47

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
  •  
Qt is a trademark of The Qt Company.