Make the placeholder text in QLineEdit slide up on focus
-
wrote on 23 May 2022, 13:35 last edited by Donnie
I've found the solutions using only CSS, but it seems like Qt doesn't support the syntax they use.
https://www.youtube.com/watch?v=IE3U5icPv0g
https://stackoverflow.com/questions/35942247/how-to-move-placeholder-to-top-on-focus-and-while-typing
https://www.sitepoint.com/community/t/placeholder-floating-label-should-slide-up-issue/294213/3What could be the possible alternative?
-
Hi
Qt does not support full CSS. its a small subset.You can make your own custom control that does it using custom painting of the place holder text. maybe use QAnimation for the sliding.
Alternatively, you can reuse this one ( the Text Field)
-
Hi
Qt does not support full CSS. its a small subset.You can make your own custom control that does it using custom painting of the place holder text. maybe use QAnimation for the sliding.
Alternatively, you can reuse this one ( the Text Field)
https://github.com/laserpants/qt-material-widgets
-
@Donnie
Hi
I dont think its prepared to build as a library but should not be impossible to build it as such and link it to your app.
1/4