I have a class which inherit from QDoubleSpinBox.
class NumericEdit : public QDoubleSpinBox
{
public:
NumericEdit( QWidget *p_parent = nullptr );
protected:
bool event( QEvent *p_event ) override;
void keyPressEvent( QKeyEvent *p_event ) override;
void keyReleaseEvent( QKeyEvent *p_event ) override;
void focusInEvent( QFocusEvent *p_event ) override;
void focusOutEvent( QFocusEvent *p_event ) override;
............
};
NumericEdit::NumericEdit( QWidget *p_parent ) : QDoubleSpinBox( p_parent )
{
initStyleSheet();
setButtonSymbols( QAbstractSpinBox::NoButtons );
setGroupSeparatorShown( true );
..........
}
The result when I double click into the editing field is like this, only the part in between group separators is marked. If I triple click, the whole text is then marked.
How should I change, sothat when I double click into the editing field (no matter in integer part or decimal part), the whole text is marked?