Results 1 to 3 of 3

Thread: Execute command without terminal window

  1. #1
    Join Date
    Nov 2008
    Posts
    183
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Execute command without terminal window

    This used to be simple, but now it seems to have changed.

    Ubuntu 12.4.5 Qt 5.4 from the _run file

    Attempting to launch an unzip command with QProcess. No matter what I do it brings up a terminal window, even when I say startDetached(). Do I have to drop out of Qt and use the C system() call to achieve what I want?

    I don't want to see the terminal or have the terminal prompt me to hit enter for it to go away. I just want unzip to run and communicate via stdout/err to my program.

    I don't remember this happening with earlier versions of Qt. I remember a way to execute without seeing anything.

    Thanks,
    Roland

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Execute command without terminal window

    This is strange, QProcess should not involve any terminal at all.

    Have you checked if the program you are launching is maybe a script that invokes a terminal?

    Cheers,
    _

  3. #3
    Join Date
    Jun 2015
    Posts
    2
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Execute command without terminal window

    Other way of doing it without QProcess is use system() API call. Ex: system("chmod 777 abcd.bin");

Similar Threads

  1. Need to Execute an system command, in QT
    By gunturrohith in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 27th November 2014, 09:28
  2. How to execute Powershell command from QT?
    By Gokulnathvc in forum Newbie
    Replies: 3
    Last Post: 22nd January 2014, 00:30
  3. Execute window command line-by-line using QProcess
    By nhocjerry in forum Qt Programming
    Replies: 5
    Last Post: 30th July 2013, 13:21
  4. Replies: 7
    Last Post: 15th April 2007, 02:39
  5. call bash/terminal command with QT
    By myta212 in forum Newbie
    Replies: 1
    Last Post: 13th November 2006, 16:38

Tags for this Thread

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.