
Originally Posted by
mickey
how to declare a signal from QT designer...I don't understand...fileSave is a QAction. I have insert statusMessage(const QString&) as signal in "members" from qt designer..
is not ok?
You have declared a signal for your form and not for the QAction object. You can't add signals to already existing classes. You have to subclass them to do that.
It'll be better if you connect the activated() signal from your QAction to a custom slot in the form and implement the functionality there:
connect(fileSaveAction, SIGNAL(activated()), this, SLOT(onActivated()));
//...
void myclass::onActivated(){
statusBar()->message(varHoldingCustomMessage);
}
connect(fileSaveAction, SIGNAL(activated()), this, SLOT(onActivated()));
//...
void myclass::onActivated(){
statusBar()->message(varHoldingCustomMessage);
}
To copy to clipboard, switch view to plain text mode
Bookmarks