471,350 Members | 1,438 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,350 software developers and data experts.

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

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)

Nov 25 '07 #1
1 5089
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.

Nov 25 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Srinath Avadhanula | last post: by
2 posts views Thread by Sibylle Koczian | last post: by
9 posts views Thread by Eric Jardim | last post: by
15 posts views Thread by Rhy Mednick | last post: by
9 posts views Thread by anders | last post: by
14 posts views Thread by Gotch | last post: by
3 posts views Thread by JohnM | last post: by
11 posts views Thread by Lamont Sanford | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.