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. how to display / update textEdit ?
Forum Updated to NodeBB v4.3 + New Features

how to display / update textEdit ?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 154 Views 3 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.
  • A Offline
    A Offline
    Anonymous_Banned275
    wrote on last edited by
    #1

    The attached snippet of code runs fine, however,
    the Process... " blocks " the
    text = " hcitool scan... ";
    MWBD->ui->textEdit_3->append(text);
    MWBD->update();
    MWBD->show();

    hence its text (in dialog ) appears AFTER the Process.. is finished.

    Is the solution to create another "display" process prior to the Process...?

    Yes the Process ,,, creates new blocking process which is fine because it runs in real time and has to finish.

               text = " hcitool  scan...  ";
                MWBD->ui->textEdit_3->append(text);
                MWBD->update();
                MWBD->show();
                text = BTUL->ProcessCommand_Raw(" hcitool "," scan  " );
                qDebug() << text;
                MWBD->ui->textEdit_3->append(text); // displays both text 
    
    sierdzioS 1 Reply Last reply
    0
    • A Anonymous_Banned275

      The attached snippet of code runs fine, however,
      the Process... " blocks " the
      text = " hcitool scan... ";
      MWBD->ui->textEdit_3->append(text);
      MWBD->update();
      MWBD->show();

      hence its text (in dialog ) appears AFTER the Process.. is finished.

      Is the solution to create another "display" process prior to the Process...?

      Yes the Process ,,, creates new blocking process which is fine because it runs in real time and has to finish.

                 text = " hcitool  scan...  ";
                  MWBD->ui->textEdit_3->append(text);
                  MWBD->update();
                  MWBD->show();
                  text = BTUL->ProcessCommand_Raw(" hcitool "," scan  " );
                  qDebug() << text;
                  MWBD->ui->textEdit_3->append(text); // displays both text 
      
      sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      @AnneRanch Either start process with a delay QTimer::singleShot(), or through meta object system QMetaObject::invokeMethod(), or move it to another thread, or let the app process events before calling your blocking code:

      qApp->processEvents();
      text = BTUL->ProcessCommand_Raw(" hcitool "," scan  " );
      

      (Z(:^

      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