From 4ad28e6076ad5ab297ddfbc836f76a2844820499 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 9 Dec 2024 10:04:33 +0100 Subject: [PATCH] don't show the placeholder when text is not empty --- src/controls/QskTextFieldSkinlet.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/controls/QskTextFieldSkinlet.cpp b/src/controls/QskTextFieldSkinlet.cpp index c0809a3c3..0792e8409 100644 --- a/src/controls/QskTextFieldSkinlet.cpp +++ b/src/controls/QskTextFieldSkinlet.cpp @@ -61,8 +61,13 @@ QSGNode* QskTextFieldSkinlet::updateSubNode( } case PlaceholderTextRole: { - return updateTextNode( skinnable, node, - textField->placeholderText(), Q::PlaceholderText ); + if ( textField->text().isEmpty() ) + { + return updateTextNode( skinnable, node, + textField->placeholderText(), Q::PlaceholderText ); + } + + return nullptr; } }