Questions tagged [qprocess]

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

The QProcess class is used to start external programs and to communicate with them.

To start a process, pass the name and command line arguments of the program you want to run as arguments to start(). Arguments are supplied as individual strings in a QStringList.

Alternatively, you can set the program to run with setProgram() and setArguments(), and then call start() or open().

The official Qt documentation can be found here for Qt 4.8 and here for Qt 5.

675 questions
-1
votes
3 answers

Qt QProcess get memory information

I am trying to use QProcess to get the memory, I'm using RedHat 7.3, if I open a terminal and type free, this gives me: total used free shared buff/cache available Mem: 7865728 1602988 3984928 …
SPlatten
  • 5,334
  • 11
  • 57
  • 128
-1
votes
1 answer

QProcess exit status and starting new one

I'm a newbie in using QT Code : void MainWindow::test() { ui->label->setText("it worked !"); proc->start("c:/windows/system32/calc.exe"); } void MainWindow::on_pushButton_clicked() { proc = new QProcess(); …
User
  • 11
  • 1
-1
votes
1 answer

a Batch file that uses nircmd.exe

i'm trying to run a batch file using qt, the batch file is using nircmd.exe program and looks like this: @echo off nircmd setprimarydisplay 2 timeout /t 10 nircmd setprimarydisplay 1 exit and i'm trying to run this line in…
biramb
  • 11
  • 1
  • 3
-1
votes
1 answer

How to start a bash script in terminal from QT program?

I want the program to check if the script already started and if not - then start it (in Terminal and as root) Thank you! ;-) QProcess *proc = new QProcess(); proc->setWorkingDirectory("/home/user/Documents/"); …
user3027198
  • 183
  • 3
  • 11
-1
votes
1 answer

qt - how to open external app without crash

I've written my app using allegro library and I want to open this app from qt. Problem is that allego app for work needs to open external font file. When I'm using: QProcess *myProcess = new QProcess(); myProcess->start("C:/allegroApp.exe"); app…
qazkm
  • 1
  • 3
-1
votes
1 answer

QProcess terminate process tree

I am currently working on a project with Qt5.4 and C++. In this project I start and stop Processes with the QProcess class. I am now extending the project to start batch files. The Problem is that I want to terminate/kill the processes started with…
b.holz
  • 237
  • 3
  • 17
-1
votes
1 answer

Signals in Qt waitforbyteswritten() function

I'm having a GUI interface done with Qt containing a button with an event handler function. When I click the button , the event handler is fired and inside it I create a new process and taking into account that this process can require either no…
-1
votes
1 answer

Program executed using QProcess fails to start

I'm trying to execute a process using QProcess on Windows, but it keeps failing to start. Here's the code I'm using: env = QtCore.QProcessEnvironment.systemEnvironment() proc =…
Chris B.
  • 85,731
  • 25
  • 98
  • 139
-1
votes
2 answers

Running .exe file using QProcess creates hundreds of the same processes

I have a problem running phantomjs.exe binary in my QProcess class. Consider this code: QString program = "phantomjs.exe"; QProcess *process = new QProcess(this); process->start(program, QStringList() << "test.js"); When I start the app main…
Maxim Makhun
  • 2,197
  • 1
  • 22
  • 26
-1
votes
1 answer

Remove files using QProcess

I want to remove all .exe files before compiling a make file. I used the following lines to do that but it doesn't work. What is the problem with QProcess? Is there any other solution to this? Please help. QProcess del; del.start("rm",…
Denzil
  • 326
  • 3
  • 15
-2
votes
1 answer

PyQt5 doesn't launch QProcess in a window-chain

I have a program that requires several scripts to work together. I managed to recreate the situation with a simplified example. I have a main window (here called the StartTestUIv01) that is launched from another script (here called LaunchTestv01) so…
Ad Ep
  • 23
  • 7
-2
votes
1 answer

The command started in the QProcess does not return a response on linux

I'm tryin get loaction of node package. Using QProcess to execute commang which node: QProcess process; process.start("/usr/bin/which", QStringList() << tr("node")); process.waitForFinished(-1); response = process.readAllStandardOutput(); qDebug()…
dissfall
  • 11
  • 6
-2
votes
1 answer

Display QProcess output in another window

I'm using the QT Creator on Ubuntu. I have GUI with a mainwindow and another window called "progress". Upon clicking a button the QProcess starts and executes an rsync command which copies a folder into a specific directory. I created a textbrowser…
GemKnight
  • 3
  • 3
-3
votes
1 answer

connect QProcess with QProgressbar

i have this code but it is not working.i am trying to update progressbar while my video is converting.video conversion is fine but progessbar is not updating void MainWindow::on_pushButton_clicked() { QString alienpath="ffmpeg"; QStringList…
suraj kiran
  • 49
  • 1
  • 1
  • 9
-4
votes
1 answer

Run an external program from a QT Pushbutton

I have created a main Window with one Pushbutton in QT and when I try to run an additional small program when the Pushbutton is clicked, it doesn't work. I have the following code: void MainWindow::on_pushButton_clicked() { QProcess *process =…
J.Blanco
  • 1
  • 1
1 2 3
44
45