Hi Aamer4yu,
Me too tried a sample code to enable/disable menubar with some button click, it worked fine.
But in my project I couldnt figure out the problem. I suspect the problem with loading back the menu item in the menubar.
Any more Idea plz send word.
Hi JPN,
As you said,I have tried the following code
void DWCMainWindow::setMainMenu( bool setCondn ) {
QMenuBar* mnu
= menuBar
();
/*This line causes the crash, while enable menuBar() returns NULL.*/ mnu->setEnabled ( setCondn );
}
void DWCMainWindow::setMainMenu( bool setCondn ) {
QMenuBar* mnu = menuBar();/*This line causes the crash, while enable menuBar() returns NULL.*/
mnu->setEnabled ( setCondn );
}
To copy to clipboard, switch view to plain text mode
plz tell me the wrokaround. Waiting for your Help.
Thanks for your interest guys
Bookmarks