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. check whether a script exists by script name
Forum Updated to NodeBB v4.3 + New Features

check whether a script exists by script name

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 4 Posters 3.7k Views 2 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.
  • U user4592357
    2 Apr 2020, 18:54

    @JonB
    okay. and above code is okay? specifically, the while (!process.atEnd()); part.

    J Offline
    J Offline
    JonB
    wrote on 2 Apr 2020, 18:58 last edited by JonB 4 Feb 2020, 18:59
    #21

    @user4592357

    while (!process.atEnd());

    Lord, no, I didn't look! That would occupy all CPU time for parent process!

    If you want to do it synchronously that way you must at least use waitForFinished(), see the example & discussion at https://doc.qt.io/qt-5/qprocess.html#synchronous-process-api. It's not the best compared to asynchronous with signal/slot, but I haven't got time, again see the doc if you want to understand.

    U 1 Reply Last reply 2 Apr 2020, 19:15
    2
    • J JonB
      2 Apr 2020, 18:58

      @user4592357

      while (!process.atEnd());

      Lord, no, I didn't look! That would occupy all CPU time for parent process!

      If you want to do it synchronously that way you must at least use waitForFinished(), see the example & discussion at https://doc.qt.io/qt-5/qprocess.html#synchronous-process-api. It's not the best compared to asynchronous with signal/slot, but I haven't got time, again see the doc if you want to understand.

      U Offline
      U Offline
      user4592357
      wrote on 2 Apr 2020, 19:15 last edited by
      #22

      @JonB
      i see. thanks a lot

      1 Reply Last reply
      0

      21/22

      2 Apr 2020, 18:58

      • Login

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