[Qt-interest] QPaintEngine setSystemRect should not be changed while engine is active?

Samuel Rødal sroedal at trolltech.com
Wed Jul 1 10:59:05 CEST 2009


Kermit Mei wrote:
> On Wed, 2009-07-01 at 10:03 +0200, Samuel Rødal wrote:
>> Kermit Mei wrote:
>>> On Tue, 2009-06-30 at 16:36 +0200, Samuel Rødal wrote:
>>>> Kermit Mei wrote:
>>> <snip>
>>>>> Rum it, the system tell me:
>>>>>
>>>>> QPaintEngine::setSystemRect: Should not be changed while engine is
>>>>> active
>>> <snip>
>>>
>>>> How does the paint function look?
>>>>
>>>> --
>>>> Samuel
>>> Thank you, Samuel. I'd like to paste all the source file here so that
>>> you can help me:)
>> Hmm, the paint() function looks ok, so I'm not sure what's going wrong. 
>> Perhaps try commenting out the call to showRealWidget() in the paint 
>> function, and see if that helps. It might not be a good idea to call 
>> setCurrentWidget or setVisible etc during the paintEvent(). You could 
>> try to use a single shot timer to delay the call to showRealWidget().
> 
> Hmm, I'd like to try. And by the way, is it also a bad idea to call
> setCurrentWidget(),setVisible() or show() etc in different thread?

Yep, GUI code should only be called from the main thread / GUI thread.

--
Samuel



More information about the Qt-interest-old mailing list