For set window background use void QWidget::setPaletteBackgroundColor ( const QColor & ) [virtual]
For set window background use void QWidget::setPaletteBackgroundColor ( const QColor & ) [virtual]
a life without programming is like an empty bottle![]()
I am aware of this function - it existed in Qt3 and am using Qt4...I can't figure out how to set the background to a *.jpg...how can i use the above function for this!!!Originally Posted by zlatko
thanks
Qt Code:
view->setPalette(palette);To copy to clipboard, switch view to plain text mode
J-P Nurmi
nupul (10th April 2006)
Well try create palette with needed picture brush...And use setPalette() for your widget...
And just remark : have you try use QDesigner for set background image?
a life without programming is like an empty bottle![]()
Originally Posted by zlatko
No. Why? Does it have any benefit?
well jpn, thanks for the reply...I had gone over that particular section in the doc but missed the mention of "customPattern (Pixmap)" at the bottom right of the image....perception of image problems
Thanks.
Nupul
Em..for me yes its very big benefit...Why i must do it by own coding if i can just set it from QDesignerOriginally Posted by nupul
..Think about it
![]()
Code less create more![]()
a life without programming is like an empty bottle![]()
This is the obvious benefit....i just wanted to know if there was anything more to itOriginally Posted by zlatko
Thanks
nupul
No only your time keepingOriginally Posted by nupul
![]()
a life without programming is like an empty bottle![]()
You can learn from the code it generates to see how should things be done properly.Originally Posted by nupul
Bookmarks