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?

Qt Code:
  1. void
  2. myClass::changeEvent(QEvent *event)
  3. {
  4. if (event->type() == QEvent::WindowStateChange) {
  5. if (this->windowState() & Qt::WindowActive) {
  6. printf("raised\n");
  7. }
  8. QWidget::changeEvent(event);
  9. }
  10. }
To copy to clipboard, switch view to plain text mode