thnx for reply,
I tried this but it does nt work...........
I used this way
fileMenu
=new QMenu("File",
this);
menubar->setGeometry(10,10,40,20);
actionMenu
=new QMenu("Actions",
this);
menubar->addMenu(fileMenu);
menubar->addMenu(actionMenu);
menubar->setStyleSheet("background-color: red);");
}
Widget::Widget(QWidget *parent): QWidget(parent)
{ menubar=new QMenuBar(this);
fileMenu=new QMenu("File",this);
menubar->setGeometry(10,10,40,20);
actionMenu=new QMenu("Actions",this);
menubar->addMenu(fileMenu);
menubar->addMenu(actionMenu);
menubar->setStyleSheet("background-color: red);");
}
To copy to clipboard, switch view to plain text mode
But widget is not showing menubar
How to do??
Bookmarks