mirsoy
7th May 2010, 08:45
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 :
http://i43.tinypic.com/98bj7k.jpg
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 :
http://i42.tinypic.com/2ibgks1.jpg
Here is my minimizing function:
void KtDockTitle::on_pbMin_clicked()
{
if(!parentWidget()->isWindow())
return;
if(parentWidget()->isMinimized())
{
parentWidget()->showNormal();
parentWidget()->setGeometry(oldGeometry_);
}
else
{
oldGeometry_ = parentWidget()->geometry();
parentWidget()->showMinimized();
}
}
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 :
http://i43.tinypic.com/98bj7k.jpg
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 :
http://i42.tinypic.com/2ibgks1.jpg
Here is my minimizing function:
void KtDockTitle::on_pbMin_clicked()
{
if(!parentWidget()->isWindow())
return;
if(parentWidget()->isMinimized())
{
parentWidget()->showNormal();
parentWidget()->setGeometry(oldGeometry_);
}
else
{
oldGeometry_ = parentWidget()->geometry();
parentWidget()->showMinimized();
}
}