Results 1 to 2 of 2

Thread: using postEvent, but still getting async error

  1. #1
    Join Date
    May 2006
    Posts
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default using postEvent, but still getting async error

    ok guys-

    so my prog is simple, i have a HBOX class that has two labels in it. I also have a thread class with a aimple run function, the run function uses postEvent to post and event on the HBOX's event list, this event is passed two qpixmaps. teh customEvent in the HBOX class takes those two qpixmaps and uses setPixmap to set teh two labels to different pics.

    oh yeah, in the threads run function, there is a infinite while loop, in this loop, some if statements swtich the pictures around, this is for testing, but i wanted to get the pictures changing

    anyway, whenever i make the prog, ill go to run it, and on the first try, there is always a XLib: unexpected async reply error, and my whole thing crashes.....but, if i kill it, then run it again, it runs fine..

    can any of you thing of why this might be happening, i thought async only got pissed if you tryed to call functions from a thread.

    thanks ahead of time

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: using postEvent, but still getting async error

    QPixmaps are stored on the X server, so you shouldn't touch them in a non-GUI thread. What does your thread do exactly?

Similar Threads

  1. Unable to execute in Debug Mode
    By Kapil in forum Installation and Deployment
    Replies: 38
    Last Post: 5th April 2006, 07:27
  2. Fed up with M$ Window$ !!! Why is Tux leaving me alone???
    By fullmetalcoder in forum General Discussion
    Replies: 35
    Last Post: 18th March 2006, 12:57
  3. Problems with Q_OBJECT and subclassing
    By renaissanz in forum Qt Programming
    Replies: 4
    Last Post: 21st February 2006, 22:18
  4. Am I the only one with "make" error ?
    By probine in forum Installation and Deployment
    Replies: 1
    Last Post: 13th February 2006, 12:54
  5. qmake_image_collection.cpp gives me a compiling error
    By vfernandez in forum Qt Programming
    Replies: 2
    Last Post: 31st January 2006, 01:42

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
  •  
Qt is a trademark of The Qt Company.