Details
-
Suggestion
-
Resolution: Done
-
P3: Somewhat important
-
5.12
Description
Currently, the placeholder text color is calculated internally. Basically, it's 50% translucent text color. When customizing controls, the pre-calculated placeholder text color may not be suitable, so we should add a placeholderTextColor property to give users a chance to define a color that matches e.g. with a custom background.
Example usage:
import QtQuick 2.9 import QtQuick.Controls 2.3 ApplicationWindow { visible: true width: 640 height: 480 TextField { anchors.centerIn: parent color: "white" placeholderText: "Search..." placeholderTextColor: "#aabbccdd" // <=== background: Rectangle { color: "black" } } }
Attachments
Issue Links
- resulted from
-
QTBUG-66176 QML TextField QuickControls2 - placeholderText is almost transparent when background is black
- Closed