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. Can't open non QT based exe files successfully with QProcess
Qt 6.11 is out! See what's new in the release blog

Can't open non QT based exe files successfully with QProcess

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 642 Views
  • 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
    AasiApina
    wrote on last edited by
    #1

    Hi.

    I can open the same QT program which im using with no problem,
    but if i try to open any of my own games, they just crash right away.

    Does this have something to do with different libraries, since my games are SDL2-based or am I just doing something terribly frong?

    This is the code im using to open the file:

    QProcess *process = new QProcess(this);
    process->start(project.ExePath);
    
    1 Reply Last reply
    0
    • Cobra91151C Offline
      Cobra91151C Offline
      Cobra91151
      wrote on last edited by
      #2

      Hi! You can use the static method to open your games.

      QProcess::startDetached(project.ExePath);
      

      or

      QProcess *process = new QProcess(this);
      process->startDetached(project.ExePath);
      process->deleteLater();
      

      Here is detailed information about the method - http://doc.qt.io/qt-5/qprocess.html#startDetached

      1 Reply Last reply
      1
      • A Offline
        A Offline
        AasiApina
        wrote on last edited by
        #3

        Solved!

        It tried to open E-drive files from the C-drive.

        aha_1980A 1 Reply Last reply
        1
        • A AasiApina

          Solved!

          It tried to open E-drive files from the C-drive.

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Hi @AasiApina,

          glad you figured it out. So please mark this topic as SOLVED now. Thanks.

          Qt has to stay free or it will die.

          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