Re: PyQt, Cannot send events to objects owned by a different thread?
AEXÍúA»êà´AEXÍúɽ¿Í¼ÊµÄ¢Ü· ±ÌA'AE®' (http://www.pwblog.com/user/xru01/syusyoku/)ÍÀåïÌwÍÅÍæèØé±Æª¢ïƾíêĢܷB ÄAAJÌTuvCðçØèÉø«N±³ê½¡ñÌsµA»ê±»NÔÉí½ÁÄA¢EoÏÉCpNgð^¦±¯éŵå¤B ±ÌúÌA¡Ì*Ƚª¼ÊµÄ¢éAE®Æ¢¤CxgÍA*ȽÌl¶AAEl¶Ìå«ÈEGCgðèßé±ÆÆÈèÜ·B AE®ÍAZpÆm¯ÅæèØé±ÆªoÜ·BAEXÍúAâÎÉã÷µÈ¢æ¤ÉSÍÅí¢Üµå¤B -- icejobjob icejobjob's Profile: http://forums.yourdomain.com.au/member.php?userid=5313 View this thread: http://forums.yourdomain.com.au/showthread.php?t=18594 -- http://mail.python.org/mailman/listinfo/python-list
Re: PyQt, Cannot send events to objects owned by a different thread?
David Boddie wrote: > You can either construct some sort of event handling mechanism or use > signals and slots. Personally, I'd use signals and slots for this, if > possible. > > The idea would be to set up a connection between your callback code and > the status bar's showMessage() slot. Then you would only have to emit that > signal to update the status bar. hallo david, great, the signal an slot mechanism works over threads, thanks alex -- http://mail.python.org/mailman/listinfo/python-list
Re: PyQt, Cannot send events to objects owned by a different thread?
On Sun Nov 25 15:22:24 CET 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? Maybe the implementation of the library is different on OS X. You need to give us more enough information to work with. > 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? You can either construct some sort of event handling mechanism or use signals and slots. Personally, I'd use signals and slots for this, if possible. The idea would be to set up a connection between your callback code and the status bar's showMessage() slot. Then you would only have to emit that signal to update the status bar. David -- http://mail.python.org/mailman/listinfo/python-list
Re: PyQt, Cannot send events to objects owned by a different thread?
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. -- http://mail.python.org/mailman/listinfo/python-list
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) -- http://mail.python.org/mailman/listinfo/python-list