Unsolved Image next to menubar & toolbar
-
Hi!
I'd like to insert an image at the top-right side of the application. The image would be the same size as the menubar and the toolbar together, but I can not insert an image next to them. Can I insert it somehow?
Thank you!
-
Hi amezei,
Maybe you can put both the toolbar and menubar inside a frame, and set the image as a background there.
Regards,
José -
@amezei ,
Hi,
Take a QLabel, set image to that label,
Pixmap pix(":/1.png");
m_Label->setPixmap(pix);QHBoxLayout *hbox = new QHBoxLayout();
QVBoxLayout *vbox = new QVBoxLayout();QMenuBar *m_MenuBar = new QMenuBar();
QToolBar *m_ToolBar = new QToolBar();vbox->addWidget(m_MenuBar);
vbox->addWidget(m_ToolBar);hBox->addLayout(vBox);
hBox->addWidget(m_Label); -
Thank you for the answer. Is there a way to do it in the Qt Creator designer? (with QMainWindow and QMenuBar, QToolbar)
-
@amezei : If you are trying to set window Icon can use
app.setWindowIcon(QIcon("./Icon"));