Hello,
I have 2 main windows and I would like that each time one of them is raised by the user - by clicking on it - the other one be raised so as to always have all windows either visible or not, ie not hidden by another application (otherwise I have to raise each window individually).
I was about to solve it by overloading the changeEvent() method but this method is not called when a window is raised by clicking on it. Any idea?
void
myClass
::changeEvent(QEvent *event
){
if (event
->type
() == QEvent::WindowStateChange) { if (this->windowState() & Qt::WindowActive) {
printf("raised\n");
}
}
}
void
myClass::changeEvent(QEvent *event)
{
if (event->type() == QEvent::WindowStateChange) {
if (this->windowState() & Qt::WindowActive) {
printf("raised\n");
}
QWidget::changeEvent(event);
}
}
To copy to clipboard, switch view to plain text mode
Bookmarks