Trolltech Home | Qt4-preview-feedback Home | Recent Threads | All Threads | Author | Date
All threads index page 1

Qt4-preview-feedback Archive, November 2006
QWidget resize and X sync


Message 1 in thread

Hello,

There seems to be a problem with Widget resizing and X sync, after resizing a 
QWidget, painting on it starts hogging the Xserver, resizing it back to 
previous size stops the excessive cpu load by xorg.

Now that I'm porting to QGraphicsView, and no longer make use of a custom 
double buffering approach, and the same problem shows up, I figured something 
related to X and QWidget must be wrong.

Adding either:

QApplication::syncX ();
or
QCoreApplication::flush ();

in the resizeEvent() of the class derived from QGraphicsView solves the 
problem!

This issue never showed up in Qt 3, but does in all Qt 4 version I've used 
(4.0, 4.1.0-3, 4.2.0)

System info:
ATI radeon 9200, using radeon driver from xorg
xorg 7.1.1
gcc 4.1.2
Qt4 all versions

Regards,

Remon

To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 2 in thread

Remon Sijrier wrote:
> There seems to be a problem with Widget resizing and X sync, after
> resizing a QWidget, painting on it starts hogging the Xserver, resizing it
> back to previous size stops the excessive cpu load by xorg.

Could you please provide some example code, so that we can try to reproduce
this problem?

Andreas

-- 
 [ signature omitted ] 

Message 3 in thread

Hello,

I did some more testing, and unfortunately the problem seems to show up 
randomly, the syncX(); apparently doesn't solve it, at least not always.

When the problem shows up, most of the time maximizing the window 'solves' the 
problem.

So, I'm completely clueless to what is going on, the system is a fresh Ubuntu 
install so there shouldn't be any problems with linking to an old compilation 
of Qt or things like that, anyway, here is the sample code, there is some 
widget and layout creation in there, but I wanted to create the same 
situation as I have now in my app.

The blue square (located top left) generates about 35% xorg usage when moving 
around, and 'when it happens', it simply starts hogging the cpu.

Hopefully (or maybe not, and I should look for another graphics card....) you 
can reproduce the problem.

Thanks for your time,

Remon

To unsubscribe - send "unsubscribe" in the subject to qt4-preview-feedback-request@xxxxxxxxxxxxx


Message 4 in thread

Here's the test program :-)


R.

Attachment:

Attachment: test.tar.gz
Description: application/tgz