[Qt-interest] Connecting ToolButtons directly to actions in qt4 designer

J-P Nurmi jpnurmi at gmail.com
Sun Oct 9 14:39:01 CEST 2011


On Thu, Oct 6, 2011 at 11:34 AM, Nathan Hüsken <nathan.huesken at posteo.de> wrote:
> Hi,
>
> When I have a toolbar, I can add actions to it in qt4 designer.
> This creates buttons, which trigger the actions and which also are
> enabled or disabled depending on the actions being enabled or disabled.
>
> Can I archive the same with a normal toolbutton not placed in a toolbar?
> Sure, I can connect the trigger() to the action, but can I also make it
> such that the button is automatic enabled and disabled depending on the
> action being enabled or disabled?
>
> That would be very convenient.

See QToolButton::setDefaultAction().

--
J-P Nurmi



More information about the Qt-interest-old mailing list