holst
7th September 2009, 15:58
Hi,
I have a QPushButton, in a QDialog, that has its signal "clicked()" connected to one slot that is part of the Dialog.
I want that someone, externally of this Dialog, connects to same signal then disconnects from the other slot.
I want a QPushButton that can has only one slot connected to its signals "clicked()"
I see this function:
QObject::connectNotify(const char * signal)
But notifies when the connection is already made. So if I overload this function to do something like this:
void CMyButton::connectNotify(const char * signal)
{
this->disconnect(SIGNAL(signal));
// How to connect the last signal-slot made?
}
I disconnect all, including the last connection made that I want to keep.
Any ideas??
Thanks
I have a QPushButton, in a QDialog, that has its signal "clicked()" connected to one slot that is part of the Dialog.
I want that someone, externally of this Dialog, connects to same signal then disconnects from the other slot.
I want a QPushButton that can has only one slot connected to its signals "clicked()"
I see this function:
QObject::connectNotify(const char * signal)
But notifies when the connection is already made. So if I overload this function to do something like this:
void CMyButton::connectNotify(const char * signal)
{
this->disconnect(SIGNAL(signal));
// How to connect the last signal-slot made?
}
I disconnect all, including the last connection made that I want to keep.
Any ideas??
Thanks