[solved]How to set multiline text in qlineedit
-
wrote on 19 Oct 2013, 05:55 last edited by
Is it possible to set set multiline placeholder text in Qlineedit?
-
wrote on 19 Oct 2013, 06:06 last edited by
No. QLineEdit is, as the name suggests, for editing a line of text and can only display a single line of input or placeholder. If you are trying to put instructions in the box then you could use the tool tip. If you want to display or edit multiple lines look at QTextEdit or QPlainTextEdit.
-
wrote on 22 Oct 2013, 11:11 last edited by
thanks chris,
I reimplemented Qtextedit and created setplaceholder property in textedit. But I have a problem, I reimplement QtextEdit as myTextEdit, So every time i create new textedit widget at runtimeonly, Is it possible to create at Qt designer or how can I set reimplemented placeholder text property to ui->Textedit objects? -
wrote on 22 Oct 2013, 12:31 last edited by
Hi,
is not clear: it seems you're talking about two different things, the default placeholderText property and your "setplaceholder" property, or? What are you trying to achieve?
-
wrote on 22 Oct 2013, 13:19 last edited by
yep, Its two different properties..
-
wrote on 24 Oct 2013, 05:00 last edited by
You can use the Designer Promote feature to insert your custom widget in place of a standard QTextEdit. You will not be able to set your custom property through Designer unless you go through the process of building a Designer plugin for your custom widget.
-
wrote on 24 Oct 2013, 05:10 last edited by
Thanks for your reply Chris,
I got another way, To create separate object from that reimplemented class and assign it to designer widget..
5/7