Results 1 to 2 of 2

Thread: Problem at Minimizing QDockWidget

  1. #1
    Join Date
    Oct 2009
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Problem at Minimizing QDockWidget

    Hey,

    I have implemented my own dock widget and title widget. titile widget has minimize, maximize, dock/undock and close buttons. when I minimized the dock widget, it appears like that :


    when i double clicked the minimized title widget, it dockes itself to a dock window. what i want is to replace the dock widget to its old geometry. i tried to overwrite WindowStateChange and mouseDoubleClickEvent, but that did not work (qt does not return those events in minimized state). is it possible to show tool buttons in minimized state or overwrite doube clicking?

    Here is my own dock title :


    Here is my minimizing function:
    Qt Code:
    1. void KtDockTitle::on_pbMin_clicked()
    2. {
    3. if(!parentWidget()->isWindow())
    4. return;
    5.  
    6. if(parentWidget()->isMinimized())
    7. {
    8. parentWidget()->showNormal();
    9. parentWidget()->setGeometry(oldGeometry_);
    10. }
    11. else
    12. {
    13. oldGeometry_ = parentWidget()->geometry();
    14. parentWidget()->showMinimized();
    15. }
    16. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by mirsoy; 7th May 2010 at 13:13.

  2. #2
    Join Date
    Jun 2011
    Posts
    7
    Qt products
    Qt3 Qt4

    Default Re: Problem at Minimizing QDockWidget

    cn u plz send that code , ....im also hvng same requirement of miniming the dockwidget ,like mdisubwindow........

Similar Threads

  1. Minimizing Mfc application with open Qt dialog
    By elizabeth.h1 in forum Qt Programming
    Replies: 0
    Last Post: 26th September 2009, 20:08
  2. minimizing main window
    By eric in forum Qt Programming
    Replies: 4
    Last Post: 28th November 2007, 16:54
  3. Crash when minimizing OpenGL widget
    By MistaPain in forum Qt Programming
    Replies: 5
    Last Post: 7th October 2006, 16:58
  4. Minimizing mainwindow in Win XP
    By kroenecker in forum Newbie
    Replies: 1
    Last Post: 23rd June 2006, 22:49
  5. My dialog can't restore after minimizing?
    By gtthang in forum Qt Programming
    Replies: 1
    Last Post: 11th January 2006, 15:18

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.