Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hello, does anybody know if it's possible to fit size of QLineEdit to PlaceHolder text?
Is any metod or I have to use fixed size??
BR Tomek
Hi,
you could use QFontMetrics::width() to get the widht of the placeholder text. Then use that width to set the sizeHint
QFontMetrics::width()
sizeHint