Results 1 to 1 of 1

Thread: QApplication::postEvent having no effect

  1. #1
    Join Date
    May 2010
    Posts
    19
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Symbian S60

    Default QApplication::postEvent having no effect

    I'm having trouble with postEvent.. in that it has no effect at all. I've even tried simplifying so that whenever I get a mouse event it just reposts it, but I'm still getting nothing. here's what I'm doing..

    void MyClassView::mousePressEvent(QMouseEvent *event)
    {
    qDebug() << "MyClassView::mousePressEvent:";
    QMouseEvent *event1 = new QMouseEvent(*event);
    QApplication:: postEvent(this, event1);
    }

    I've tried posting the event to the parent which is the base widget, but still nothing. I do have a separate thread spawned from the base widget to load files, but I can't see why this would have any effect, especially as it is just waiting on idle priority and other events are getting through. I've had a look at some example code to see if I'm doing anything different and I just don't see it...

    Is there something else I need to set to allow this, or am I just being dumb?

    Post Script: sendEvent is having no effect either...
    Last edited by Tito; 17th July 2010 at 16:48.

Similar Threads

  1. postEvent and multithreading
    By Thymson in forum Qt Programming
    Replies: 4
    Last Post: 22nd December 2008, 13:22
  2. QCoreApplication::postEvent();
    By chrisdsimpson in forum Newbie
    Replies: 6
    Last Post: 1st April 2008, 21:23
  3. postEvent thread problem
    By jhamers in forum Qt Programming
    Replies: 1
    Last Post: 5th March 2008, 10:36
  4. PostEvent
    By user_mail07 in forum Qt Programming
    Replies: 8
    Last Post: 1st June 2007, 00:01
  5. postEvent() to a non-existing receiver
    By Artschi in forum Qt Programming
    Replies: 7
    Last Post: 1st June 2006, 14:44

Tags for this Thread

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.