PDA

View Full Version : [B]How to show Pixmap on QMenuBar??[/B]



bigbigmoon
16th April 2007, 03:34
Hello, everyone!
does anyone know how to show Pixmap on QMenuBar??!


menu1=new QMenuBar(this) ;
QPixmap app_Normal;
app_Normal.convertFromImage(app_normal);
menu1->insertItem(app_Normal);

But it doesn't show the Pixmap.
what's the problem with these codes?
Could you supply me with your codes?

Thank you !

marcel
16th April 2007, 06:26
That's the wrong way to go!
First of all, you have to load the pixmap from somewhere(something) and then set it to a menu item.

You will have to read carefully the documentation for QPixmap, QMenuBar and QMenu.

bigbigmoon
17th April 2007, 06:55
Thanks a lot!
I have solved the problem!:p :)