PDA

View Full Version : Qt3 : How to set the background??



Kunkka
8th April 2011, 04:52
there are much fewer functions be used to set background than qt4 .


playWidget->setPaletteBackgroundPixmap(QPixmap(":/images/background.png"));
playWidget->show();

these codes were lost on the widget!:(

nobody? i just want to paint a picture on a widget named by playWidget under the environment of qt3!

stampede
8th April 2011, 07:53
nobody? i just want to paint a picture on a widget named by playWidget under the environment of qt3!
Easy, I'm sure someone will help you. Please note the time difference, many users of this forum are from Europe, so they were probably sleeping while you posted your first post (as it was posted ~3:00 - 4:00 local time here).
As for the question, have you tried to reimplement paintEvent and draw the pixmap there ? I've never used Qt3, but I think paintEvent was available there (please correct me if I'm wrong).

wysota
8th April 2011, 10:33
What's the base class of playWidget?

Kunkka
18th April 2011, 02:07
Please note the time difference, many users of this forum are from Europe, so they were probably sleeping while you posted your first post (as it was posted ~3:00 - 4:00 local time here).

haha...  i very much appreciated that you reminded me . i was impatient of all this waiting.
now i know how to set the background, Thank you.