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

CONNECT

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

    HI.i will connect two textedit .i want write one thing in first an
    .that show someting diferien
    Encrypt this is for

    1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by mrjj
      #2

      Hi
      You can use signals + slots for that
      So when textedit one changes it can call your slot and
      you can do whatever u want with the text before
      calling append on edit 2

      See
      http://doc.qt.io/qt-5/qtextedit.html#html-prop
      TextChanged() signal
      and apprend() slot

      Its very unclear what you will do to text1 before adding it into text2

      M.ASADIM 1 Reply Last reply
      2
      • mrjjM mrjj

        Hi
        You can use signals + slots for that
        So when textedit one changes it can call your slot and
        you can do whatever u want with the text before
        calling append on edit 2

        See
        http://doc.qt.io/qt-5/qtextedit.html#html-prop
        TextChanged() signal
        and apprend() slot

        Its very unclear what you will do to text1 before adding it into text2

        M.ASADIM Offline
        M.ASADIM Offline
        M.ASADI
        wrote on last edited by
        #3

        @mrjj tanks but i will write something in one textedit and he give me something different in second .
        i write below code but dont work
        QString A;
        QString As;
        if(A)="e"
        AS="r"
        connect(ui->tx0,SIGNAL(textEdited(A)),ui->tx,SLOT(setText(AS)))

        mrjjM 1 Reply Last reply
        0
        • M.ASADIM M.ASADI

          @mrjj tanks but i will write something in one textedit and he give me something different in second .
          i write below code but dont work
          QString A;
          QString As;
          if(A)="e"
          AS="r"
          connect(ui->tx0,SIGNAL(textEdited(A)),ui->tx,SLOT(setText(AS)))

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @M.ASADI
          Its not correct syntax.
          You cannot give it values in the connect.
          It comes with the signal when triggered.

          did you study
          http://doc.qt.io/qt-5/signalsandslots.html ?

          its
          textEdited(const QString & text)
          so
          connect(ui->tx0,SIGNAL(textEdited(const QString & )),ui->tx,SLOT(setText(const QString & )))

          1 Reply Last reply
          2

          • Login

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