PDA

View Full Version : How to gainst the window draw itself again and again?



c154387417
20th February 2011, 07:37
A newbie to Qt. If any strange questions i've post, forgive me please.

When window's move/resize envents happen,
how can it only draw a dotted-rectangle instead,
but do not let the system draw the window again and again.
That's too slow.

Yes, on windows platform, i can do it like this:



SystemParametersInfo(SPI_SETDRAGFULLWINDOWS,
FALSE, NULL, NULL);


Okay, i mean i need Cross Platform Code here.
---------------------------------------------

THANK YOU SO MUCH!
------------------------

Excuse me, for my English....and, any Chinese Qter here?

high_flyer
21st February 2011, 09:59
you can try setting Qt::WA_UpdatesDisabled with setAttribute().
I don't know if this will still make the doted frame though...

Another way is to make an event filter, create the doted frame, move the doted frame, and on mouse release, move the actual window.

c154387417
21st February 2011, 13:02
to high_flyer

Thanks a lot :o. I'll try what you told me.
And, if more problems found on it, can i post thread here continue?

high_flyer
21st February 2011, 13:09
And, if more problems found on it, can i post thread here continue?
Sure, this is what the forum is for. :)

c154387417
21st February 2011, 14:28
i mean, i post problems just rely them like this message...if nobody hate a long thread. :rolleyes: