Qt-interest Archive, January 2007
QImage::load() causes warnings
Message 1 in thread
Calling load (which succeeds) causes four warning messages on my system.
Qt 4.2.2, Windows XP, Microsoft Visual Studio 2005 (8.0)
QImage m_up;
.
.
.
b = m_up.load(":/images/up.bmp");
QObject::moveToThread: Current thread (0369CFB8) is not the object's thread
(02E2AE78).
Cannot move to target thread (02E2AE78)
QObject::moveToThread: Current thread (0369CFB8) is not the object's thread
(02E2AE78).
Cannot move to target thread (02E2AE78)
QObject::moveToThread: Current thread (0369CFB8) is not the object's thread
(02E2AE78).
Cannot move to target thread (02E2AE78)
QObject::moveToThread: Current thread (0369CFB8) is not the object's thread
(02E2AE78).
Cannot move to target thread (02E2AE78)
--
[ signature omitted ]
Message 2 in thread
Hi,
> Calling load (which succeeds) causes four warning messages on my system.
It's hard to tell why without a small compilable example that reproduces
the problem. Are you calling QImage::load() from outside the main thread?
--
[ signature omitted ]
Message 3 in thread
"Dimitri" <dimitri@xxxxxxxxxxxxx> wrote in message
news:eob714$s7i$1@xxxxxxxxxxxxxxxxxxxxx
> Hi,
>
>> Calling load (which succeeds) causes four warning messages on my system.
>
> It's hard to tell why without a small compilable example that reproduces
> the problem. Are you calling QImage::load() from outside the main thread?
I haven't created any threads in the program, so I assume I must
be calling QImage::load() from the main thread.
--
[ signature omitted ]
Message 4 in thread
Hi,
> I haven't created any threads in the program, so I assume I must
> be calling QImage::load() from the main thread.
Good. Do you see the warnings with a different image file or image
format ? With a file instead of a resource?
I'm asking because many Qt examples load images from files or resources
into QImage and they don't seem to be emitting warnings (at least not
with Qt 4.2.2 on Linux).
Are you able to reproduce the warnings with a small compilable example?
--
[ signature omitted ]