Results 1 to 4 of 4

Thread: forcing dock windows to dock?

  1. #1
    Join Date
    Aug 2009
    Posts
    81
    Platforms
    MacOS X Windows

    Default forcing dock windows to dock?

    my dock window is floating, i want to force it to dock without user interaction. how can i do that?

    Thanks

  2. #2
    Join Date
    Aug 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: forcing dock windows to dock?

    If you are using a QMainWindow, it has a method addDockWidget that will dock the docking window to one of its docking areas, Qt::LeftDockWidgetArea, Qt::RightDockWidgetArea, Qt::TopDockWidgetArea or Qt::BottomDockWidgetArea.

  3. #3
    Join Date
    Aug 2009
    Posts
    81
    Platforms
    MacOS X Windows

    Default Re: forcing dock windows to dock?

    i do use a QMainWindow... and AddDockWidget and that works at the first call... but my question is now if i have my dockwidget floating and i want to return it docking without user interaction... how i can do that? (AddDockWidget does not return a floating dock to his dock when i try)

  4. #4
    Join Date
    Aug 2009
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: forcing dock windows to dock?

    Ok, I just tried, and simply calling QDockWidget::setFloating with false will dock the thing back to its docking area.

    If you want it docking on some other area, then you have to first assign it to its new area using QMainWindow::addDockWidget, and then 'unfloat' it.

    (Sorry, for some reason I understood your question as "my docking window appears first undocked, and I want it to first appear docked").

Similar Threads

  1. Replies: 5
    Last Post: 15th January 2009, 09:03
  2. Evaluation Example Dock Widgets Hangs Windows
    By inflector in forum Qt Programming
    Replies: 6
    Last Post: 30th December 2006, 19:03
  3. Dock windows in a MDI window
    By aronsson in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 10:22

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.