I have a QML TextArea
for which I'd like a wider scrollbar. TextArea
inherits from ScrollView
, and it appears that the only style
member in the TextArea
class is inherited from ScrollView
, so I thought I could just assign a ScrollViewStyle
to the TextView
's style
member.
However, assigning this suggested ScrollViewStyle
example to my TextArea
's style
member triggers error messages and makes the screen flicker oddly.
Here are the error messages:
file:///<qtpath>/Qt/5.5.1/5.5/gcc_64/qml/QtQuick/Controls/TextArea.qml:766:32: Unable to assign [undefined] to QColor
file:///<qtpath>/Qt/5.5.1/5.5/gcc_64/qml/QtQuick/Controls/TextArea.qml:765:29: Unable to assign [undefined] to QColor
file:///<qtpath>/Qt/5.5.1/5.5/gcc_64/qml/QtQuick/Controls/TextArea.qml:764:20: Unable to assign [undefined] to QColor
file:///<qtpath>/Qt/5.5.1/5.5/gcc_64/qml/QtQuick/Controls/TextArea.qml:763:19: Unable to assign [undefined] to QFont
file:///<qtpath>/Qt/5.5.1/5.5/gcc_64/qml/QtQuick/Controls/TextArea.qml:762:25: Unable to assign [undefined] to int
file:///<qtpath>/Qt/5.5.1/5.5/gcc_64/qml/QtQuick/Controls/TextArea.qml:725:24: Unable to assign [undefined] to QColor
What's going on? How do I assign a ScrollViewStyle
to the TextArea
properly (assuming this is indeed the problem)? (E.g., can I explicitly scope the style
assignment somehow? ScrollView.style: ScrollViewStyle { ...
gives the error "Non-existent attached object
.") Alternatively, is there a simpler way to just make the scroll bar wider without getting into this whole mess?
I'm using 64-bit Qt 5.5.1 on Debian 7 Wheezy.