Results 1 to 2 of 2

Thread: Maximize a particular widget on a dialog when double clicked on it

  1. #1
    Join Date
    Mar 2008
    Posts
    46
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Maximize a particular widget on a dialog when double clicked on it

    Hi friends i have a small problem i have a couple of tab widgets on a QDialog. I am trying to use mouseDoubleClickEvent to maximize the Tab Widget i have clicked on. But it does't work.
    Qt Code:
    1. void Maxi_tab::mouseDoubleClickEvent(QMouseEvent *Event)
    2. {
    3. tabWidget->showFullScreen();
    4. }
    To copy to clipboard, switch view to plain text mode 

    I then came over a solution but i think there is a better way to do it. I am resizing the tab widget which i have double clicked on the QDialog.
    Qt Code:
    1. void Maxi_tab::mouseDoubleClickEvent(QMouseEvent *Event)
    2. {
    3. if childAt(Eventpos->pos() == frame)
    4. this->showFullScreen();
    5. tabWidget->resize(1200,950);
    6. }
    To copy to clipboard, switch view to plain text mode 

    This is what i tried to maximize the Tab Widget i wanted to miximize on a double click on the QDialog form. Can any one pls tell me a better way.


    Thank You

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,364
    Thanks
    3
    Thanked 5,012 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Maximize a particular widget on a dialog when double clicked on it

    Hide all widgets but the tab widget. Or set its parent temporarily to 0 and then show it full screen.

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.