Qt-interest Archive, April 2007
Show specified dock
Message 1 in thread
Hi!
How I can show specified dockwidget programmaticaly, if two or more
docks are tabbed? Qt 4.2.3. Win XP Pro SP2.
Anton I Alferov.
--
[ signature omitted ]
Message 2 in thread
Anton I Alferov wrote:
> How I can show specified dockwidget programmaticaly, if two or more
> docks are tabbed? Qt 4.2.3. Win XP Pro SP2.
I had the same problem and I was told yesterday that the sequence
dock->show();
dock->raise();
helps, but so far had no chance to verify it.
Until now I used
struct Raiser : public QObject {
bool eventFilter(QObject * ob, QEvent * ev) {
if (ev->type() == QEvent::Show) {
QEvent e(QEvent::ZOrderChange);
QApplication::sendEvent(ob, &e);
}
return false;
}
};
static Raiser theRaiser;
dock->installEventFilter(&theRaiser);
as workaround to raise-on-show, but I think this qualifies
as 'hack'...
Andre'
--
[ signature omitted ]