Hi again,
Just wondering if anyone would mind having a look at an issue I am having and maybe point out where I am going wrong.
I have created a simple widget with a push button it Qt Designer, I have created Signals and Slots, clicked() and process_started() respectively. I am trying to run another Qt application when the push button is pressed.
However I keep getting compile errors which I cannot seem to resolve, so hopefully a fresh pair of eyes may be able to assist.
mainwindow.cpp:19: error: ISO C++ forbids declaration of ‘process_started’ with no type
mainwindow.cpp:19: error: prototype for ‘int mainwindow:
rocess_started()’ does not match any in class ‘mainwindow’
mainwindow.h:25: error: candidate is: void mainwindow:
rocess_started()
{
Q_OBJECT
public:
mainwindow();
public slots:
void process_started();
class mainwindow : public QMainWindow
{
Q_OBJECT
public:
mainwindow();
QProcess *process;
public slots:
void process_started();
To copy to clipboard, switch view to plain text mode
mainwindow::mainwindow()
{
widget.setupUi(this);
}
mainwindow::process_started()
{
process->start("./home/i386-qt-rss");
}
mainwindow::mainwindow()
{
process = new QProcess();
widget.setupUi(this);
}
mainwindow::process_started()
{
process->start("./home/i386-qt-rss");
}
To copy to clipboard, switch view to plain text mode
int main(int argc, char *argv[])
{
mainwindow w;
w.show();
return app.exec();
}
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
mainwindow w;
w.show();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Thanks very much for having look.
HS
Bookmarks