Hi there,

Please can you help me with a little compile issue in my event filter.

Qt Code:
  1. bool MainWindow::eventFilter(QObject *obj, QEvent *event)
  2. {
  3. if (obj == ui->timeLabel) {
  4. if (event->type() == QEvent::MouseButtonPress) {
  5. QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
  6. timeMousePressEvent(mouseEvent);
  7. return true;
  8. }
  9. }
  10. return QMainWindow::eventFilter(obj, event);
  11. }
To copy to clipboard, switch view to plain text mode 

This code is being compiled for the Qt simulator under creator 2 and using Qt 4.6.3. I am sure this code works on my desktop apps, so is there something different about using this with S60 development, because I get the following compile error:

'static_cast' : cannot convert from 'QEvent *' to 'QMouseEvent *'

Can anyone help?

Many thanks
jimiq