So I am looking at QScreenOrientationChangeEvent However I cannot seem to find *any* info on it. How do I implement it? Anybody some pointers please?

I tried this code in my mainwindow but it doesn't even fire.
Qt Code:
  1. bool MainWindow::event(QEvent *event)
  2. {
  3. if (event->type() == QEvent::OrientationChange)
  4. {
  5. mainwidth = desk.width(); // how do it get this stuff?
  6. mainheight = desk.height();
  7. }
  8. return QWidget::event(event);
  9. }
To copy to clipboard, switch view to plain text mode