Hi i am started to learn Qt5, it is strange to me because i came from GTK+.
So my question has with how to emmit a signal from an QDialog object.
The QDialog's pushButton ( the form has only one pushButton ) every time that i press the pushButton to call a method from another class.
The second class has a SLOT as :
public slots :
void value();
how do i use the connect method at main.cpp?
main has as :
#include "dialog.h"
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
Dialog w;
Coutput out;
// QObject::connect(&w, SIGNAL(clicked()), &out, SLOT(value()));
/* what i should filled as a connect's source ? */
w.show();
return a.exec();
}
I refresh that the w is a Dialog object from class
namespace Ui {
class Dialog;
}
class Dialog : public QDialog
{
Q_OBJECT
public:
explicit Dialog(QWidget *parent = 0);
~Dialog();
private:
Ui:ialog *ui;
};
which has been Qdesigner
Thank you.
Bookmarks