Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PyQt, Cannot send events to objects owned by a different thread?

Reply
Thread Tools

PyQt, Cannot send events to objects owned by a different thread?

 
 
Alexander Tuchacek
Guest
Posts: n/a
 
      11-25-2007
hallo,

i try to adress an qt object

self.statusbar.showMessage("rtt %s...." % (n.rtt))

in an callback function, comming from a shared lib importet by ctypes, on
osx this works wonderfull

when i run the same code on linux (ubuntu gutsy), i get this core dump, ok,
i understand that the problem is, that i cant speak to the qt thread, but
why does it work on osx?

shall i recompile python? pyqt or sip? without threads?

could somebody give me a hint what to do best? how can i call a qt object in
an c-lib callback?

thanks for any help,
alex

ASSERT failure in QCoreApplication::sendEvent: "Cannot send events to
objects owned by a different thread. Current thread 82c31e8.
Receiver 'MainWindow' (of type 'MainWindow') was created in thread
81f5060", file kernel/qcoreapplication.cpp, line 269
Aborted (core dumped)

 
Reply With Quote
 
 
 
 
Bjoern Schliessmann
Guest
Posts: n/a
 
      11-25-2007
Alexander Tuchacek wrote:
> i try to adress an qt object
>
> self.statusbar.showMessage("rtt %s...." % (n.rtt))
>
> in an callback function, comming from a shared lib importet by
> ctypes, on osx this works wonderfull
>
> when i run the same code on linux (ubuntu gutsy), i get this core
> dump, ok, i understand that the problem is, that i cant speak to
> the qt thread, but why does it work on osx?


Luck. If something works reproducibly in some conditions, that
neither means it will work elsewhere nor that it is wise to do so
at all.

(I will spare the group far-fetched road traffic similes for
now )

> shall i recompile python? pyqt or sip? without threads?
>
> could somebody give me a hint what to do best?


Just use Qt as recommended in its docs; that's how you do the best
you can against future portability or other issues.

Regards,


Björn

--
BOFH excuse #99:

SIMM crosstalk.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: PyQt, Cannot send events to objects owned by a different thread? David Boddie Python 1 11-25-2007 05:29 PM
port currently owned by unknown windows application tolu45 Java 4 03-29-2006 07:42 PM
Events Events Events Please Help Chris ASP .Net Web Controls 0 08-30-2005 08:21 PM
Cisco owned (linksys wet11b) is cisco failing to see market demands? Kieron Joy Cisco 1 03-11-2005 04:39 AM
If you are a Doctor and you own/owned a D30 please read this! york Digital Photography 1 06-24-2004 03:00 PM



Advertisments