Skip to content
  • 0 Votes
    9 Posts
    788 Views
    Ronel_qtmasterR

    @Jammin44fm Normally you use process events when you have differents events that can impact or slow down the main thread .
    In the main file you just want to start your application.Is there even in your main file that can impact the main thread?following your code no.So you can't call QApplication::processEvents() in the main.cpp

    Now a situation where you can use QApplication::processEvents() for instance, lets say you have an application that capture frames from the camera , display that in the UI and also send them to a server.

    This in a situation where we have multiple events.Now when handling these events you can use in one of them QApplication::processEvents(), or QThread to avoid that the app freezes

  • 0 Votes
    4 Posts
    512 Views
    SGaistS

    @oblivioncth said in Help with Autotest for Gerrit submission:

    So I should just add the cases locally, ensure they test correctly, and then commit --amend & push the changed test file as part of the rest of my submission?

    That's correct yes.

  • 0 Votes
    4 Posts
    1k Views
    D

    Hi guys
    I solved this problem by adding a sleeping time duration in my worker thread preventing it from returning too quick. Then the message box gets shown properly and closed properly.

    // member function to do the job bool MainWindow::waitReply() { // Here to sleep for a while QThread::sleep(2); bool received_valid_reply = false; while (!m_waitReplyCancelled) { if (Something Is Received) { received_valid_reply = true; return received_valid_reply; } } return received_valid_reply; }