Results 1 to 12 of 12

Thread: Thread Search in text file large

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2012
    Posts
    41
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded Qt Jambi
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Thread Search in text file large

    Hi everyone.
    I need a system that searches of large text files, you must have a main form and a search form that runs on a different thread because it freezes the system. I must also open up new forms of search that works simultaneously and I can stop, pause and restart the search.

    Main Form - frmTelaPrincipal.cpp
    Qt Code:
    1. void clsTelaPrincipal::on_actionCadastro_de_Clientes_tr iggered()
    2. {
    3. clsCadClientes *objfrmCadClientes = new clsCadClientes;
    4. ui->mdiArea->addSubWindow(objfrmCadClientes);
    5. objfrmCadClientes->show();
    To copy to clipboard, switch view to plain text mode 

    Search Form - frmCadClientes.cpp
    Qt Code:
    1. void clsCadClientes::on_cmdTextEdit_clicked()
    2. {
    3. Open file routine here...
    4. ui->txtEdit->setPlainText(in.readAll());
    5. file.close();
    6. }
    7. }
    8.  
    9. void clsCadClientes::on_cmdSearch_clicked()
    10. {
    11. while (ui->txtEdit->find(ui->lineEdit->text()))
    12. {
    13. ui->txtEdit->setTextBackgroundColor("yellow");
    14. }
    To copy to clipboard, switch view to plain text mode 
    How do I post the source code?

    marcos.miranda
    msn: jmbm.trab@bol.com.br
    Attached Files Attached Files
    Last edited by wysota; 11th June 2012 at 07:51. Reason: missing [code] tags

Similar Threads

  1. Advice: Reading large text file.
    By enricong in forum Qt Programming
    Replies: 7
    Last Post: 16th July 2011, 12:11
  2. Search HTML in non-gui thread
    By mirag in forum Qt Programming
    Replies: 1
    Last Post: 19th March 2010, 13:38
  3. Replies: 4
    Last Post: 25th May 2008, 20:01
  4. Text search utility
    By NewGuy in forum Newbie
    Replies: 7
    Last Post: 23rd July 2006, 11:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.