Monday, 9 September 2013

QProcess saving to Qtextedit

QProcess saving to Qtextedit

What I'm trying to do is launch a program within another program using
QProcess and then save the output from the launched program into a
QTextEdit of the launcher program. Every time I launch this program I want
it to add more text to the QTextEdit. Now I get the program to launch but
then after the text is supposed to be written it crashes. Here is the
code:
#ifndef WIDGET_H
#define WIDGET_H
#include <QtGui/QWidget>
#include <QPushButton>
#include <QTextEdit>
class Widget : public QWidget
{
Q_OBJECT
public:
Widget();
~Widget();
public slots:
void launchModule();
void finished();
private:
QPushButton* addBtn;
QTextEdit* text;
};

No comments:

Post a Comment