Qt 5.9 > Qt Quick Controls 2 > ComboBox: the textbox doesn't support multiline text because it ignores formatting
Unsolved
QML and Qt Quick
-
QML Type ComboBox in version Qt 5.9 behaves differently from Qt 5.8. In Qt 5.9 the textbox of a ComboBox ignores formatting and doesn't support multiline text and HTML.
Here's a minimalistic example for producing the problem:
main.qml:import QtQuick 2.8 import QtQuick.Controls 2.1 import QtQuick.Window 2.2 ApplicationWindow { visible: true width: 400 height: 300 title: qsTr("ComboBox test with Qt 5.9") ComboBox { id: multilineComboBox anchors { topMargin: 20 rightMargin: 20 leftMargin: 20 top: parent.top right: parent.right left: parent.left } model: [ "multiline:\n choise 1", "multiline:\n choise 2", "multiline:\n choise 3" ] } }
The result for Qt 5.8:
The result for Qt 5.9:
Is it possible to fix this problem in the next version of Qt 5.9?
-
@Konst_777
Is it the exact same QML file tested with both versions? If so it is a regression bug and should be reported (if not done already). -
Yes, it is the exact same QML file except line "title: qsTr("ComboBox test with Qt 5.9")", where the version number of the Qt was changed from "5.8" to "5.9".
Accordingly to your advice I reported about this problem in QTBUG-62686.