Results 1 to 3 of 3

Thread: Is it possible to restrict a floating QDockWidget to a certain screen area?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Is it possible to restrict a floating QDockWidget to a certain screen area?

    Dear all,

    I want to have a window which is movable but prohibited to overlap other QDockWidgets, just like a QMdiSubwindow in normal mode. I tried a QDockWidget, but as a top level widget it cannot be restricted in position to a certain screen rectangle. A QMdiSubwindow sets all other Subwindows to normal mode too if it is restored (my central area is a QMdiArea already).

    Any ideas?

  2. #2
    Join Date
    May 2011
    Posts
    239
    Thanks
    4
    Thanked 35 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Symbian S60

    Default Re: Is it possible to restrict a floating QDockWidget to a certain screen area?

    I have no idea of an elegant solution, but I guess you could keep a list of all QDockWidgets, capture their moveEvents and reposition them nicely, should they overlap.

  3. #3
    Join Date
    Apr 2011
    Posts
    5
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Is it possible to restrict a floating QDockWidget to a certain screen area?

    Ok, another question: is it possible to have one QMdiSubwindow maximized and the other in normal mode?

Similar Threads

  1. Events of floating QDockWidget
    By harregui in forum Qt Programming
    Replies: 8
    Last Post: 20th January 2017, 16:21
  2. Floating QDockWidget not re-docked by QMainWindow::restoreState
    By stefanadelbert in forum Qt Programming
    Replies: 14
    Last Post: 20th October 2016, 21:16
  3. QDockWidget floating at the beginning
    By Caius Aérobus in forum Qt Programming
    Replies: 0
    Last Post: 2nd March 2011, 13:15
  4. Replies: 1
    Last Post: 7th December 2010, 21:46
  5. QDockWidget : No floating
    By prashant in forum Qt Programming
    Replies: 1
    Last Post: 5th October 2009, 18:42

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.