Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.10
-
None
-
039c25daac5ec6b96c0aa074eae2a983a1b5aabd
Description
With the code below, the user should be able to start typing a value for the SpinBox, but it's necessary to press tab first to give the TextInput active focus:
import QtQuick 2.9 import QtQuick.Controls 2.0 ApplicationWindow { id: window visible: true width: 640 height: 600 onActiveFocusItemChanged: print(activeFocusItem) SpinBox { focus: true editable: true } }
Compare a similar Qt Widgets application that behaves as expected:
#include <QApplication> #include <QtWidgets> int main(int argc, char *argv[]) { QApplication app(argc, argv); QWidget widget; widget.resize(400, 400); QSpinBox *spinBox = new QSpinBox(&widget); widget.show(); return app.exec(); }
Attachments
For Gerrit Dashboard: QTBUG-60356 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
192494,3 | Forward focus to the contentItem of editable spinboxes | 5.9 | qt/qtquickcontrols2 | Status: MERGED | +2 | 0 |