PDA

View Full Version : Maximize a particular widget on a dialog when double clicked on it



dheeraj
17th July 2008, 14:40
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.


void Maxi_tab::mouseDoubleClickEvent(QMouseEvent *Event)
{
tabWidget->showFullScreen();
}


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.


void Maxi_tab::mouseDoubleClickEvent(QMouseEvent *Event)
{
if childAt(Eventpos->pos() == frame)
this->showFullScreen();
tabWidget->resize(1200,950);
}


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

wysota
17th July 2008, 14:42
Hide all widgets but the tab widget. Or set its parent temporarily to 0 and then show it full screen.