Reputation: 5776
I'm new in Qt World)
I created a new Qt Application in MSVC 2008
Using Qt Creator added controls I need and one of them is QMenuBar
As I understend the equivalent of CallBack(C#) is Slot in Qt.
I culdn't find any information how to create a custom Slot for QMenu using Qt Creator.
Upvotes: -1
Views: 233
Reputation: 8788
FancyMenuBar
.Q_OBJECT
macro in your class definition (google for more info) in fancymenubar.h.public slots:
in your class definition, e.g., somewhere between public:
and private:
.void fancySlot();
.(in fancymenubar.cpp)
void FancyMenuBar::fancySlot()
{
// type code here
}
Now you can use the slot via the QObject::connect()
function, or use the slot as if it were a normal public function.
Upvotes: 1