Skip to content

Commit f0683d5

Browse files
authored
Set selected section to the first section on focus in QgsDateTimeEdit (#65023)
1 parent 5a86fd8 commit f0683d5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/gui/editorwidgets/qgsdatetimeedit.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,12 @@ void QgsDateTimeEdit::focusInEvent( QFocusEvent *event )
203203
QAbstractSpinBox::focusInEvent( event ); // clazy:exclude=skipped-base-method
204204

205205
displayCurrentDate();
206+
setSelectedSection( sectionAt( 0 ) );
206207
}
207208
else
208209
{
209210
QDateTimeEdit::focusInEvent( event );
211+
setSelectedSection( sectionAt( 0 ) );
210212
}
211213
}
212214

0 commit comments

Comments
 (0)