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. Reading input from a textedit
Forum Updated to NodeBB v4.3 + New Features

Reading input from a textedit

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 21.5k Views 1 Watching
  • 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.
  • O Offline
    O Offline
    ommz
    wrote on last edited by
    #1

    How do i read the input that is typed in a textEdit?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      In case of a [[Doc:QTextEdit]] use either toHtml() or toPlainText(). In case of a [[Doc:QLineEdit]] use text().

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • O Offline
        O Offline
        ommz
        wrote on last edited by
        #3

        I meant how do i read the input and store it in a variable

        1 Reply Last reply
        0
        • R Offline
          R Offline
          raaghuu
          wrote on last edited by
          #4

          @QString lineEditText = myLineEdit->text();@
          @QString textEditText = myTextEdit->toPlainText();@

          1 Reply Last reply
          1

          • Login

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