PDA

View Full Version : Show QPixmap into QMenuBar



^NyAw^
28th May 2008, 09:52
Hi,

Is there anyway to show a QPixmap into the QMenuBar? I want to show a Logo on the top right of it.

Thanks,

lyuts
28th May 2008, 11:03
Hi,

Is there anyway to show a QPixmap into the QMenuBar? I want to show a Logo on the top right of it.

Thanks,

You can try to use addMenu or addAction methods.

addMenu ( const QIcon & icon, const QString & title ). When you create a QIcon object you can specify a QPixmap in its constructor.

or

addAction ( QAction * action )
The constructor of QAction (this one QAction ( const QIcon & icon, const QString & text, QObject * parent ) )receives QIcon again.... just put your QPixmap into QIcon constructor and it should work.