Skip to content
  • David Redondo's avatar
    Make all buttons in the main window activatable with enter · 34484c93
    David Redondo authored
    Summary:
    In a QDialog QPushbuttons will have autoDefault==true and the Dialog will call
    setDefault(true) on them. This allows the user to activate the Buttons with the
    enter key. However we also use QToolButtons in the main window with no visible
    difference to the user. This caused unexpected activations of the help button
    (the first default button) when a tool button was focused. In a custom event
    handler we can check if the current focused widget is tool or push button when
    the enter key is pressed and activate them accordingly.
    
    BUG: 412184
    FIXED-IN: 19.08.3
    
    Reviewers: #spectacle, ngraham
    
    Reviewed By: #spectacle, ngraham
    
    Subscribers: ngraham, aprcela, #spectacle
    
    Tags: #spectacle
    
    Differential Revision: https://phabricator.kde.org/D24508
    34484c93