Hello folks, I've been trying to put a QX11EmbedContainer in my app, and I need to start a terminal within it (because with konsolepart I can practically do nothing).
QX11EmbedContainer* container = new QX11EmbedContainer(this); // with or without "this" I got the same result
container->show();
QProcess process(container);
QString exec...
Hi,
i am using Qprocess to execute ping to check for a host to be online or not...
The problem is that the exit code that i recieve from the Qprocess->finished signal is always 2 no matter if i ping a reachable host or an unreachable one..
I am continuously pinging in a QTimer to a host(whose one folder i have mounted at client where ...
I'm using a simple QProcess-Project on a WindowsXP-Machine:
QString program = "U:\\ffmpeg.exe";
QStringList arguments;
arguments << "-i" << "U:\\clock.avi" << "U:\\tmp_jpeg\\foo-%03d.jpeg";
process.setStandardOutputFile("U:\\log.txt", QIODevice::Append);
process.start(program, arguments);
The Process works just fine, ffmpeg creates a...
I have a GUI application, which creates a QProcess inside, catches its output and shows it on a form. I need to somehow catch key events from the form to pass them to QProcess (to make it fell as close as possible to real terminal window).
So, I suppose, I should process keyReleaseEvent() and somehow transform either event.text() (which...
Why does the following print a blank line instead of 'Hello QProcess'?
import sys
from PyQt4 import QtGui, QtCore
proc = QtCore.QProcess()
proc.start("echo 'Hello QProcess'")
proc.waitForFinished()
result = proc.readAll()
print result
proc.close()
I'm on Windows XP, btw.
...
Why do I never get the readyReadStandardOutput signal when I run the following?
import os, sys, textwrap
from PyQt4 import QtGui, QtCore
out_file = open("sleep_loop.py", 'w')
out_file.write(textwrap.dedent("""
import time
while True:
print "sleeping..."
time.sleep(1)"""))
out_file.close()
def started():
p...
I'm writing a cross-platform C++ program using Qt and I want to package/embed a number of binary executables within the program. The program should be able to execute these binaries at runtime.
I figured, I would need QResource and QProcess using start() and the ":/..." notation, but I don't seem to get the process running. Is there any...
Hi Experts,
I would like to execute a R script simply as
R --file=x.R
It runs well on the command line. However when I try the system call in C++ by
QProcess::execute("R --file=x.R");
or
system("R --file=x.R");
the program R runs and quits but I can't see the output the program is supposed to generate. If a program uses no std...
i'm trying to start Microsoft word using QProcess as following:
QString program = "WINWORD.EXE";
process->start(program);
but nothing happens...
winword.exe is on path (so when i type winword.exe word is openning up)
is it the right way to do so ?
...
i'm trying to retrieve the active processes on my computer and to search for specific one,
if it exists then i should kill it.
is it possible to do it without knowing the specific path of the execute ?
i know the execute process name but not the full path.
so in short:
1. get all active processes
2. kill specific process
thanks !
...
few days ago i asked about how to get all running processes in the system using QProcess.
i found a command line that can output all processes to a file:
C:\WINDOWS\system32\wbem\wmic.exe" /OUTPUT:C:\ProcessList.txt PROCESS get Caption
this will create C:\ProcessList.txt file contains all running processes in the system.
i wonder how c...
I'm implementing a compiler in my Compilers class, I'm using Qt & C++.
After I have generated the machine code from the source code, I'm executing the virtual machine that will execute the code.
I'm facing a problem here, I'm using readyRead() signal to get output from the virtual machine, but how can I know that the virtual machine wa...
I've run into a weird error with a Qt program running on Windows. The program uses QProcess to spawn a child process wit two arguments. The program and arguments passed to the QProcess::start() method are of the form:
"batchfile.bat" "--option1=some_value" "--option2=some_other_value\with_a\path"
For some reason by the time those op...
I am making a qt application which allows the user to select a file and then upon clicking ok, start the associated program with the file already loaded. The program I want to start is java based, and I know how to use QProcess to get it to open, I don't know however how to add the file extension which the user is selecting. Any suggesti...
I'm having some trouble handling unicode output from a QProcess. When I run the following example I get ?? instead of 中文. Can anyone tell me how to get the unicode output?
from PyQt4.QtCore import *
def on_ready_stdout():
byte_array = proc.readAllStandardOutput()
print 'byte_array: ', byte_array
print 'unicode: ', unicode...
I am using a QProgressDialog to show the status of a long running operation, which includes a step of running an external executable. I run the external executable using the QProcess::execute() method. QprogressDialog works fine updating the label text till it reaches the QProcess::execute() method, after which it doesn't update the stat...
I have the following:
QProcess *process = new QProcess(this);
QString path = QDir::toNativeSeparators(QApplication::applicationPath);
#if defined(Q_OS_WIN)
process->start("explorer.exe", QStringList() << path);
#elif defined(Q_OS_MAC)
process->start("open", QStringList() << path);
#endif
How I can achieve the same behavior for le...
How can i see in QProcess the real argument list it is processing?
for debuging , i do print the QStringList before i pass its to myProcess->start(program, arguments);
is there build in debugging option?
...
I thought I was going to get the output from a QProcess using the following code:
// Start the process
process.start(tr("php-cgi www/test.php"),QIODevice::ReadWrite);
// Wait for it to start
if(!process.waitForStarted())
return 0;
// Continue reading the data until EOF reached
QByteArray data;
while(process.waitForReadyRead())
...