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. QTextEdit's find() won't find for me
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 663 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.
  • R Offline
    R Offline
    ritchan
    wrote on last edited by
    #1

    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
    0

    • Login

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