Priority: P5: Not important
Affects Version/s: 4.7.0
Fix Version/s: None
Component/s: Widgets: Widgets and Dialogs
This thread is meant to improve QPushButton, actually. But if it is indeed improved, QToolButton would be unnecessary. Please read and comment.
I think having QToolButton is a waste of resources having already QPushButton. If we merge these two classes QPushButton would be beneficted by some of QToolButton functionality, for instance: The ability to set a default QAction.
(Please look at this ticket: http://bugreports.qt.nokia.com/browse/QTBUG-7994 , specifically the comment I made there)
We know that PushButton isn't only a QPushButton. It can also be a Toggle Button, a Menu Button, and a Split Button.
A QToolButton is barely more than a QPushButton with QAction binding.
But there are some things that could also improve QPushButton and its flexibility.
For instance, the ability to chose the Icon alignment (left, right, top, bottom) and the Arrow alignment (left, right, top, bottom) in case of the Split Buttons.
Instead of having just Qt::ToolButtonTextBesideIcon and Qt::ToolButtonTextUnderIcon. Developers could benefict from the posible variations.
I can't think of a better example than ExtJS buttons, just check it out ^^