The QProcess class, part of the Qt framework, provides a way to start external programs and to communicate with them.

learn more… | top users | synonyms

0
votes
1answer
18 views

Need to display in qtextEdit real time

I have an arm board with a touchscreen display, where I want to display the output from a certain function, vcm_test(). The output of this function is saved to a file called test.txt . Now I am able ...
0
votes
0answers
21 views

Why i can't get value form QProcess use readyReadStandardOutput signal

I am working with a clientupdate.exe to update my client,so there is a func "getVersion" to get the latest version number: Execute::Execute(QObject *parent) : QObject(parent) { ...
0
votes
2answers
46 views

Need to quit a process from inside Qt GUI, just as it is started

I am trying to run C++ executables placed inside SBC6845 [inside /ftest as shown ]. Now these executables are running with while(1){ // around 250-300 lines of code here } infinite loop. Now when I ...
0
votes
0answers
34 views

Ways to use MPI executable in Qt?

I have developed an application which comprises of a frontend Qt-GUI and a solver EXE. As these two are independent module, I could successfully launch EXE in Qt-GUI by using a QProcess like below: ...
0
votes
0answers
35 views

bash file don't run with QProcess

I'm use this code to call bash file: QProcess *process = new QProcess(); process->start("/bin/bash",QStringList() << "/home/f0rtis/b.bash"); process->waitForStarted(); ...
0
votes
2answers
42 views

QProcess not exiting when invoked from a Qthread

I am trying to install a RPM using QProcess(/bin/rpm). This QProcess is running in a concurrent thread which was started by another QThread. QThread retThread = new CMyThread(this); ...
0
votes
1answer
75 views

Proper usage of QProcess

Platform: Qt 4.8.2, Win 7 Please consider the following logic flow: 1. App started 2. functionA() triggered 3. the app periodically capture some images to external files 4. end of functionA() 5. ...
2
votes
1answer
87 views

QProcess readyRead before started

I am using QProcess for the first time, and while experimenting I noticed that readyRead is signaled before started. I tried running /usr/bin/echo foobar with QProcess, and attached two functions to ...
0
votes
2answers
54 views

QProcess, Cannot Create Pipe

I am running a QProcess in a timer slot at 1 Hz. The process is designed to evoke a Linux command and parse it's output. The problem is this: after the program runs for about 20 minutes, I get this ...
0
votes
1answer
42 views

cannot use class QProcess in qt on windows 7

I just used QProcess to execute a exe file in qt on windows XP. It works normally, while not on windows 7. I think it's obviously because of the UAC issue on windows 7(or windows VISTA). Does anyone ...
0
votes
0answers
73 views

QProcess - Unable to start program - No such file or directory

I am trying to start a program (tftp) with QProcess. No matter how I start it, it won't run. I have tried to add the absolute path, to call it inside a cmd shell, but it is like the system can't find ...
0
votes
1answer
36 views

How to start application(path with space) using QProcess on mac OSX?

It goes well when using QProcess to start a program if its path without space. eg: QProcess app; app.startDetached("open /Users/test/Desktop/MyTest/Hello.app"); But, it doesn't work if the program ...
1
vote
2answers
50 views

Is it safe to use a QTemporaryFile with a QProcess?

I have to read a script from the user and call a QProcess passing that script as a file. For example, the user insert this, say, Python script import sys print(sys.copyright) and I have to put ...
2
votes
1answer
54 views

get PID of QProcess with python on windows

Is there some way to read the PID of a process started with QProcess.start(...)? QProcess::pid() returns sip.voidptr and there's not much I can do with it (or I don't know how). I want to have the ...
1
vote
1answer
65 views

QProcess dies for no obvious reason

While coding a seemingly simple part of a Qt application that would run a subprocess and read data from its standard output, I have stumbled upon a problem that has me really puzzled. The application ...
0
votes
0answers
59 views

QProcess not work with start but work with startDetached

I have a problem with start dos application with Qprocess::start. #include <QtGui/QApplication> #include <QProcess> int main(int argc, char *argv[]) { QApplication a(argc, argv); ...
0
votes
1answer
98 views

Qt QProcess Complains about QThread::Start , Thread Creation Error

I have an extremely simple app that is supposed to use QProcess to do some systemd control. Then entire program is below. Every time I run the app, it complains with the following: QThread::start: ...
2
votes
2answers
123 views

How do I read from QProcess?

I have this simple C++ program: int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); QProcess ps; QByteArray ba; ps.start("ls J:"); ba = ...
0
votes
0answers
29 views

MSVC2008+Qt4.8.1+boost - strange QProcess behavior ends in recursion (solved but searching for the why?)

I am working on a Qt 4.8.1 project to parse textfiles using Microsofts Visual Studio 2008. To test the result of the parser, I created another project using the boost unittest framework. Today I ...
0
votes
2answers
121 views

PySide, QTextEdit Append adding blank lines

I have this simple code: basically a tool to send some commands to cmd, and display the output from cmd in a QTextEdit. Basically, it works. The only problem that I have is that each time I click on ...
-1
votes
1answer
132 views

Run ffmpeg on Terminal MacOS [closed]

I'm rather new to MacOS and I cannot find it easy to working with Terminal to get ffmpeg run properly as I have on Window. I have got ffmpeg binary from http://ffmpegmac.net and I try running the ...
0
votes
0answers
93 views

Qt Calling External Python Script

I am trying to write a GUI wrapper for one of my command line tools written in Python. It was suggested to me that I should use Qt. Below is my project's .cpp file: #include "v_1.h" #include ...
0
votes
1answer
102 views

QProcess call write function failure

I need call QProcess to start up xterm ,after that I should send some data to it . why those code can't run correctly? QProcess proc; proc.start("xterm"); proc.waitForStarted(); proc.write("ls\n"); ...
1
vote
1answer
153 views

Waiting for QProcess to finish or duration to exceed

I am trying to find a solution to the following situation: A QProcess should run a command and stop executing it when a desired duration is reached or the command is finished. This QProcess is ...
0
votes
1answer
195 views

(Qt - QProcess) Communication with console application

I m trying to communicate Qt console application with another console application written in C (chess engine - TSCP). I created this class: #include "engine.h" Engine::Engine(QObject *parent) : ...
1
vote
1answer
119 views

Why QProcess signal readyReadStandardOutput() emited twice?

I use QProcess and connect it's readyReadStandardOutput to slot. But after starting slot execute twice. Tell me please why is it? { myProcess = new QProcess(parent); ...
0
votes
2answers
415 views

QProcess and shell : Destroyed while process is still running

I want to launch a shell script with Qt. QProcess process; process.start(commandLine, QStringList() << confFile); process.waitForFinished(); if(process.exitCode()!=0){ qDebug () << " ...
1
vote
1answer
69 views

QProcess (net use) does not work

I trying to run "net use \server_ip" and parse result. Platform - Windows I have the following code: QProcess *prc = new QProcess(0); QString exec="net use"; QStringList params; params << ...
1
vote
1answer
184 views

Mplayer in slave mode - multiple instances

I am developing a Qt application that is showing various media. Currently there is an issue with video files. As there were some problems in using Phonon with ATI graphic card acceleration, we are ...
0
votes
0answers
69 views

Qt QProcess strange error

I am getting a strange error on trying to execute a binary with a QProcess: QString program = QString::fromUtf8("../helper-functions/Perl/DiscoverNodes"); QProcess *myprocess = new ...
0
votes
1answer
85 views

Can't read from stdin in process spawned via QProcess::execute

Example code int main(int, char * argv[]) { QString input = QTextStream(stdin).readLine(); QTextStream(stdout) << input << "\nWe need to go deeper...\n"; return ...
1
vote
3answers
168 views

run another executable in my Qt app

i write 2 Qt application. one is main and the other is side way. i am running linux. i read about QProcess so i write this code: QApplication a(argc, argv); MainWindow w; w.show(); ...
3
votes
1answer
126 views

How to get the next solution of a SWI-prolog query with QProcess?

I'm trying to combine SWI-prolog with QProcess. So I already can interact with prolog and send questions to it, but I always getting only the first answer. So I tried to send such characters like "n" ...
0
votes
1answer
79 views

QProcess won't start the requested

I have been trying to get QProcess to start up an application. But I am facing a few problems in doing so. Here's my code: void QOpenApp::open_now() { QString program = ...
3
votes
1answer
239 views

Redirecting output from gnome-terminal using QProcess in C++

I am trying to generate a subprocess for a gui which will spawn a terminal. I want the data produced by this terminal (stdout and stderr) to be displayed on the window that appears as well as to a set ...
1
vote
2answers
670 views

How to check if a program is running by his name Qt C++

How to check if a program is running by his name, with Qt and C++ I think about QProcess::pid but i don't know how to use it... Thanks !
0
votes
2answers
299 views

QProcess.execute() a DOS command

I'am trying to call a DOS command: subst with QProcess : QProcess process; int returnCode=process.execute(QString("subst " + DLetter+" "+mountPath)); ...
3
votes
2answers
192 views

QProcess cannot write to cmd.exe

I cannot seem to get QProcess to pass commands to cmd.exe via stdin. I have tried other command line apps as well. Here is some simple code that I use to try and debug: prog = ...
1
vote
2answers
151 views

How to use the bash command 'which' from QProcess

I'm a student programmer using Qt and I seem to have ran into an issue using QProcess to launch the bash command 'which' in an attempt to collect a map of installations of an application. I have the ...
1
vote
1answer
143 views

Output of youtube-dl using QProcess

I am so new to python and am in process of learning this powerful language. I managed to write the following script. It does get a partial output ( only two lines of it ) the I don't know what is ...
1
vote
2answers
163 views

Is QProcess::finished emitted when process crashes in Qt?

In the documentation it says that the error signal will be emitted if the process crashes. But would finished be emitted as well? Or is it only emitted when the process successfully exits?
0
votes
1answer
160 views

QProcess::waitForReadyRead for stderr?

Does QProcess::waitForReadyRead return when there is data in the process's stderr, or does it wait only on stdout? How can I wait for data on stderr without using signals and slots?
0
votes
2answers
276 views

QProcess and command line “/c” argument

I have very strange problem with QProcess and it's strange behaviour. What i wanna get at the end is something like this (this is cmd.exe in windows 7) C:\path_to_somewhere>cmd /c "C:\Program ...
2
votes
1answer
69 views

kill qprocess with parent

This is the code to execute a command and return the output. The problem is that if I kill the testProcess, "ping" keeps on going. I tried also with QObject *parent; parent=new QObject; ...
0
votes
0answers
145 views

QProcess executing bash chown

I built a command line qt solution which either gets via CURL a certain package, or from a certain directory, unzips it, and installs its contents according to a predefined struture. After it ...
0
votes
1answer
169 views

How to run one qt application from another qt application

I have one Qt application (App1). I want to run App1 from another qt application (App2). I have tried using QProcess but App1 doesnt run. Kindly help me out. I am working on RHEL 6. QProcess ...
0
votes
1answer
178 views

Run a program from Qt

I am working with Qt in Linux. I need to run the "evince" pdf reader from Qt. I have been searching and as I understand I can use Qprocess to make it work. Something like this: QStringList args; ...
0
votes
1answer
516 views

QProcess.readAllStandardOutput() doesn't seem to read anything - PyQt

Here is the code sample: class RunGui (QtGui.QMainWindow) def __init__(self, parent=None): ... QtCore.Qobject.connect(self.ui.actionNew, QtCore.SIGNAL("triggered()"), ...
0
votes
0answers
16 views

qprocess not creating ofstream files

Ok so I have made a set of QT applications. The first is a Gui and multi threaded front end for the second. The second will work as intended save its log file when called with arguments on its own. ...
0
votes
1answer
346 views

Using 1 instance of QProcess in several classes (PyQt)

I have a a Main window wrapper class (Say A) and another class used in the wrapper (say B). B has a method that in turn HAD a subrocess.check_call(command) call. I'm changing it to use QProcess in ...

1 2 3