hi,
How to display listbox, texbox etc over an image?
Can i use QGridLayout for this?
Help plz..
Mahe2310
hi,
How to display listbox, texbox etc over an image?
Can i use QGridLayout for this?
Help plz..
Mahe2310
Set background pixmap for widget that will be parent for your elements by using setPaletteBackgroundPixmap
p.s. i dont know is ts possible in Qt/Embedded
a life without programming is like an empty bottle![]()
Which version do you use?
Version Qt-2.3.2Originally Posted by wysota
Try using setBackgroundPixmap() for your widget.
Originally Posted by zlatko
yea.. it worked...
Can you tell me how to set the size of a list box?
Mahe2310
use resize()
a life without programming is like an empty bottle![]()
Originally Posted by zlatko
Qt Code:
QPixmap pixmap = image; this->setPaletteBackgroundPixmap ( pixmap ); as = new QListBox( this ); g->addWidget( as, 1, 1 ); as->resize(25,30);To copy to clipboard, switch view to plain text mode
but nothing happens....![]()
Mahe2310
If you use layouts, you shouldn't try to change widget's size. If you really need to, you can try to force the widget to change its sizeHint() (but you'll probably have to subclass).
Originally Posted by wysota
I didnt get u? Can you explain?
I cant understand you....if you want resize your elements manually why are you use layouts?
Layout its mechanizm that take care about resize from users sholders, and you cant call resize by own.
a life without programming is like an empty bottle![]()
Originally Posted by zlatko
I displayed a list box, and two Push Buttons on my window. List box grows from starting i specified to the
point just top of one of the Push Button. I just want to reduce the size of the listbox so that it looks neat on
the Screen.
Mahe2310
So try setting the maximum size the box can take. This way it'll not expand more. Or change the size policy to Maximum or Preffered.
mahe2310 (6th March 2006)
Bookmarks