[Qt-interest] Default Buttons

Agnostic Pope agnosticpope at gmail.com
Tue Mar 24 01:07:27 CET 2009


So I answered my own question.

Apparently, "somehow" autodefault is on for all buttons.  I'm not quite sure
where it's pulling the default from, but by explicitly turning it off in
designer (by checking it and unchecking it), it now stays off.

--James

On Mon, Mar 23, 2009 at 2:21 PM, Agnostic Pope <agnosticpope at gmail.com>wrote:

> Hi,
>
> So I've created a dialog using QDesigner in Qt 4.4.3 with a line entry box
> and a close button.  The desired behavior is when enter is pressed, we do
> something with the input in the line edit, hit enter, but do not hit the
> close button.
>
> I can capture the signal for editingFinished() well enough, but hitting
> enter also triggers the close button.  Autodefault is off for the button in
> designer as is default, but when I hit enter and check the value for
> "default" on the close button, it's "true".
>
> Any thoughts on how I can really not make there be a default button in the
> dialog?
>
> --James
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090323/449ced55/attachment.html 


More information about the Qt-interest-old mailing list