Hi there,
Please can you help me with a little compile issue in my event filter.
{
if (obj == ui->timeLabel) {
if (event
->type
() == QEvent::MouseButtonPress) { QMouseEvent *mouseEvent
= static_cast<QMouseEvent
*>
(event
);
timeMousePressEvent(mouseEvent);
return true;
}
}
}
bool MainWindow::eventFilter(QObject *obj, QEvent *event)
{
if (obj == ui->timeLabel) {
if (event->type() == QEvent::MouseButtonPress) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(event);
timeMousePressEvent(mouseEvent);
return true;
}
}
return QMainWindow::eventFilter(obj, event);
}
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
Bookmarks