QT and Background Pixmaps

Robert.M.Wheat at barney.cs.uni-potsdam.de Robert.M.Wheat at barney.cs.uni-potsdam.de
Tue Oct 19 02:35:50 BST 1999


On Sun, 17 Oct 1999, you wrote:
> Robert.M.Wheat at fara3.cs.uni-potsdam.de, "Jr." wrote:
> > 
> > Hello,
> > 
> > I am having a problem with QT and Background Pixmaps.
> > 
> > I have learned that I must first 'qInitImageIO()', include <qimageio.h>, and link to the proper
> > ... ...
> > buttons (and perhaps other widgets).  The background pixmap that I set any button to appears for
> > only the amount of time it takes to draw the entire widget (that the button is part of) and then
> > goes back to the same old gray color.
> > 
> >From the QWidget docs:
> ... ...
> If setBackgroundPixmap() or setBackgroundColor() is called, the mode will be one of: 
> 
> FixedPixmap - the pixmap set by setBackgroundPixmap() 
> FixedColor - the color set by setBackgroundColor() 
> 
> So, you need to call setBackgroundMode( FixedPixmap );

But, from the QT Toolkit - QWidget Docs, the very next line reads:

These values may not be used as parameters to setBackgroundMode(). 

If you try what you have suggested, a message is output to the console at runtime saying;
	"May not pass FixedColor or FixedPixmap to setBackgroundMode()"

So....I am assuming that setBackgroundPixmap() is in charge of setting this BackgroundMode to
FixedPixmap.   I too thought that this would be the solution.  It seemed so obvious.

So I'm back to where I was before, not able to get a background pixmap to display on a push button!

BTW, this all occurs within the KDevelop Dialog Editor, KDevelop created and compiled code, as well
as a small, separate from KDevelop, app.

Thanx for the response, though!
-- 
Robert M. Wheat, Jr.
belran at worldnet.ibm.net



More information about the KDevelop mailing list