473,385 Members | 1,867 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 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 5547
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Srinath Avadhanula | last post by:
Hello, I am wondering if QT has something like QWaitForNextEvent() function. This function would block execution of the application till another key was pressed and then return the event...
4
by: ulysses | last post by:
hi, I'm working in python 5 months. I think it's very cool language. I do a p2p python program GUI. First I make a software by wxpython. But I find wxpython use many many memory. Second I use...
2
by: Sibylle Koczian | last post by:
Still trying to learn PyQt from a book about several Python GUI toolkits, I seem to learn first what doesn't work. The following small script seems to work, but after closing the window I get the...
9
by: Eric Jardim | last post by:
Hi, Is there any site that gather all the documentation about PyQt? The docs of the Riverbank site is poor, and I have found separate tutorials on the net. I know that the Kompany have made...
15
by: Rhy Mednick | last post by:
I have a class (let's call it ClassA) that I've written which has events. In another class (let's call it ClassB) I create a collection of ClassA objects. In a third class (ClassC) I create a...
9
by: anders | last post by:
I am writing a plugin for a piece of software in python, and I want to start up a PyQt GUI in the plugin, without stalling the main thread while the gui is running (later i will want to pass...
14
by: Gotch | last post by:
Hi all, I've recently digged into C# and the whole .Net stuff. Particularly I found the idea of adding Events and Delegates to the C# language very interesting and I'm trying to use them in...
3
by: JohnM | last post by:
Hi there, Are there any specific rules or best-practices I should be aware regarding events and the threads they're fired on. Object 1 can be created on thread 1 for instance and an event then...
11
by: Lamont Sanford | last post by:
Given an object of type Mutex, what method or property should be called to determine if it is currently owned? I could call WaitOne(0,false) -- and if the return value is false, I could deduce...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.