If you are using designer then actionQuit you call through ui.
Qt Code:
connect(ui->actionQuit, SIGNAL(triggered()), qApp, SLOT(quit()));To copy to clipboard, switch view to plain text mode
If you are using designer then actionQuit you call through ui.
Qt Code:
connect(ui->actionQuit, SIGNAL(triggered()), qApp, SLOT(quit()));To copy to clipboard, switch view to plain text mode
waynew (17th October 2009)
Thanks RSX, that did it.
Just trying to get used to things in Qt.
Indeed, if you want to refer to actionQuit as exactly that instead of ui->actionQuit, then you need to use multiple inheritance. An example is here.
It's
if ui was declared on the stack, and it's
if ui was declare in heap, like a pointer
Yes, but since it is auto-generated by Qt's UIC, then it must always be on the stack, right?
I just check in one project, it's in the heap
Qt Code:
private: Ui::area_dlg *m_ui;To copy to clipboard, switch view to plain text mode
I see now, at first I thought that UIC always generates ui as an object rather than a pointer, but then I realized that it's the IDE that generated this, not UIC.
Sorry if I wasted your time![]()
Bookmarks