Results 1 to 2 of 2

Thread: problem with event filter compile for S60

  1. #1
    Join Date
    Sep 2009
    Location
    UK
    Posts
    15
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows Symbian S60

    Question problem with event filter compile for S60

    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

  2. #2
    Join Date
    Dec 2009
    Posts
    23
    Thanks
    8
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: problem with event filter compile for S60

    I have had this problem too, but I am trying convert to QKeyEvent.
    Can help?

Similar Threads

  1. Event Filter & No Focus problem
    By AlexanderPopov in forum Newbie
    Replies: 0
    Last Post: 22nd December 2009, 20:15
  2. problem when trying to compile it.
    By cbarmpar in forum Qwt
    Replies: 1
    Last Post: 16th January 2009, 20:16
  3. QProcess Bash in Event Filter (Multiple Processes)
    By Arsenic in forum Qt Programming
    Replies: 1
    Last Post: 8th November 2008, 08:42
  4. Q3Table event filter problem
    By batileon in forum Qt Programming
    Replies: 2
    Last Post: 27th August 2008, 10:40
  5. Request for comment: Post event filter
    By wysota in forum Qt Programming
    Replies: 3
    Last Post: 7th March 2008, 21:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.