Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [solved]How to set multiline text in qlineedit

[solved]How to set multiline text in qlineedit

Scheduled Pinned Locked Moved General and Desktop
7 Posts 3 Posters 31.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    guru
    wrote on 19 Oct 2013, 05:55 last edited by
    #1

    Is it possible to set set multiline placeholder text in Qlineedit?

    1 Reply Last reply
    0
    • C Offline
      C Offline
      ChrisW67
      wrote on 19 Oct 2013, 06:06 last edited by
      #2

      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.

      1 Reply Last reply
      0
      • G Offline
        G Offline
        guru
        wrote on 22 Oct 2013, 11:11 last edited by
        #3

        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?

        1 Reply Last reply
        0
        • N Offline
          N Offline
          NicuPopescu
          wrote on 22 Oct 2013, 12:31 last edited by
          #4

          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?

          1 Reply Last reply
          0
          • G Offline
            G Offline
            guru
            wrote on 22 Oct 2013, 13:19 last edited by
            #5

            yep, Its two different properties..

            1 Reply Last reply
            0
            • C Offline
              C Offline
              ChrisW67
              wrote on 24 Oct 2013, 05:00 last edited by
              #6

              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.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                guru
                wrote on 24 Oct 2013, 05:10 last edited by
                #7

                Thanks for your reply Chris,

                I got another way, To create separate object from that reimplemented class and assign it to designer widget..

                1 Reply Last reply
                0

                2/7

                19 Oct 2013, 06:06

                topic:navigator.unread, 5
                • Login

                • Login or register to search.
                2 out of 7
                • First post
                  2/7
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved