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. get text from QTextEdit
Qt 6.11 is out! See what's new in the release blog

get text from QTextEdit

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 9.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.
  • J Offline
    J Offline
    JacobNovitsky
    wrote on last edited by
    #1

    Having of class QTextEdit

    I want to get data from textEdit_1 ("string "test" or QString) on corresponding CheckBox clicked

    void Paste::on_checkBox_clicked()
    {

    }

    How to proceed?

    qtForum.png

    jsulmJ 1 Reply Last reply
    0
    • J JacobNovitsky

      Having of class QTextEdit

      I want to get data from textEdit_1 ("string "test" or QString) on corresponding CheckBox clicked

      void Paste::on_checkBox_clicked()
      {

      }

      How to proceed?

      qtForum.png

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @JacobNovitsky Just check documentation: https://doc.qt.io/qt-6/qtextedit.html#plainText-prop

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      J 1 Reply Last reply
      3
      • jsulmJ jsulm

        @JacobNovitsky Just check documentation: https://doc.qt.io/qt-6/qtextedit.html#plainText-prop

        J Offline
        J Offline
        JacobNovitsky
        wrote on last edited by
        #3

        @jsulm I assume this is the one I'm looking for, can you share syntax pls
        QString QTextEdit::toPlainText() const

        jsulmJ 1 Reply Last reply
        0
        • J JacobNovitsky

          @jsulm I assume this is the one I'm looking for, can you share syntax pls
          QString QTextEdit::toPlainText() const

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @JacobNovitsky What syntax? toPlainText() is a methof of QTextEdit class which you can call like any other method.

          QString text = ui->textEdit->toPlainText();
          

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          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