For example, array considered two actions - "Open" and "New":
Qt Code:
void MyClass::pressMenu() { }To copy to clipboard, switch view to plain text mode
If you click in "Open", mean of name_menu is "Open", other - "New"!
For example, array considered two actions - "Open" and "New":
Qt Code:
void MyClass::pressMenu() { }To copy to clipboard, switch view to plain text mode
If you click in "Open", mean of name_menu is "Open", other - "New"!
Okey I get it. But I have another problem now. I have a menu at top. Like "File" menu in browser. In it, there are two actions: actionViewClassic, actionViewModern.
These are checkable. So if one of them is checked, the other one must be unchecked. To reach this goal,I passed the other Action as a parameter to the function.However since, I created the gui with designer, if i try to change the other buttons checked function it gives me an error Because of scoping. how can I accomplish these checkablity situation ??
Error:
GeneratedFiles\Debug\moc_assignment1.cpp(66) : error C2248: 'QAction::QAction' : cannot access private member declared in class 'QAction'
1> d:\qt\include\qtgui\../../src/gui/kernel/qaction.h(191) : see declaration of 'QAction::QAction'
1> d:\qt\include\qtgui\../../src/gui/kernel/qaction.h(41) : see declaration of 'QAction'
Last edited by bod; 27th June 2008 at 13:12.
Bookmarks