How can I simply customise one aspect of a button?
Solved
QML and Qt Quick
-
I like my TabButton to elide text in the middle - and nothing else - but QML is sending me on a wild trip that I don't want to be on. I don't want to reimplement the entire style of the button, partially because doing that isn't working - either the palette colours are missing, or Color.blend is unaccessible, and so on and so forth.
How can I just ask it to elide text in the middle and not tweak anything else at all?
-
@Vadi2
AFAI See it, you have 2 options.Ether create your own contentItem:
https://doc.qt.io/qt-5/qtquickcontrols2-customize.html#customizing-buttonor pre elide the string using TextMetrics
https://doc.qt.io/qt-5/qml-qtquick-textmetrics.html#elidedText-prop