
Originally Posted by
irish_guy@hotmail.com
I can use the signals from a normal push button but I can't understand how to get the same signals from the toolbar buttons.
There is no difference. The signal/slot mechanism works the same way for all QObject subclasses
With SIGNAL/SLOT macros:
connect(pointerToToolButton, SIGNAL(pressed()), pointerToReceiver, SLOT(someSlotNameHandlingPress()));
connect(pointerToToolButton, SIGNAL(pressed()), pointerToReceiver, SLOT(someSlotNameHandlingPress()));
To copy to clipboard, switch view to plain text mode
The circumstance that the button is on a toolbar doesn't change anything, connect() doesn't even care that the sender is a QWidget derived class.
Cheers,
_
Bookmarks