> Did you try to accept the Enter in your line edit instead? That way, it > would not propagate up. You could simply eat it or make it focus the > next item in the focus chain or something that makes sense in your context.
I thought about that. But it means a workaround out of position. What about line edits in delegates? Or in editable comboboxes, etc.? This can get nasty. Some kind of dialog-global option would be necessary. I did a lot of research and found several people having the same issue with the current implementation. Alas I could not find a clean way to solve it. So as a workound I finally changed the significantly complex dialog .ui files from QDialog to QWidget, introduced a custom base class, threw away the QDialogButtonBoxes and added the dialog buttons as normal buttons in a separate layout. This way the standardized dialog behaviour and design is down the drain but for non-trivial dialogs this is much better than frustrating users using <Enter> by accident. A new option to disable the autoDefault feature for entire dialogs would be very helpful. I considered writing a corresponding suggestion but I guess it would rot in the issue tracker forever. -- Best Regards, Bernhard Lindner
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
