> -----Original Message-----
> From: Interest [mailto:interest-bounces+mitch.curtis=qt...@qt-project.org]
> On Behalf Of Alexander Ivash
> Sent: Saturday, 9 December 2017 10:54 PM
> To: interest@qt-project.org
> Subject: [Interest] how to change color of placeholderText in Quick Controls
> 2 TextField ?
> 
> Do I understand correctly that the only way to achieve it - is to create new
> style and specify it in config? I

With Qt 5.10 you can use the new palette support 
(https://blog.qt.io/blog/2017/11/23/ready-qt-quick-controls-2-3/) by specifying 
the colour in the qtquickcontrols2.conf file:

https://doc.qt.io/qt-5/qtquickcontrols2-configuration.html#palette-configuration

As mentioned in the blog post, currently only the Default, Fusion and Imagine 
styles are supported, but the others are coming later.

Although, it seems there is currently no distinction between text and 
placeholder text:

http://code.qt.io/cgit/qt/qtquickcontrols2.git/tree/src/imports/controls/TextField.qml

I guess we'd need to add support for a placeholder text role to QPalette in 
order to support distinguishing between the two.

More info on palettes:

https://doc.qt.io/qt-5/qml-qtquick-controls2-control.html#palette-prop

> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to