Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    QTextEdit's find() won't find for me

    General and Desktop
    1
    1
    597
    Loading More Posts
    • 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.
    • R
      ritchan last edited by

      Hey all, I have some text in a readonly QTextEdit (actually a QByteArray from a QProcess displayed via QTextEdit's append()) In order to create a search box, I connected the textEdited() signal of a QLineEdit to a slot which goes like this:
      @void DcmDumpWindow::find(QString findWhat){
      qDebug() << textOutput->find(findWhat,QTextDocument::FindCaseSensitively);
      }@
      The problem is it doesn't find text which I type into the search box. That particular line keeps returning false even when I type in something which I know is in the QTextEdit. Have I set up something wrong? I can confirm the QString being sent to the find() function is the contents of the QLineEdit.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post