Hey,
for a little project of mine, i've build a little dialog.
Now, when the dialog finishes, the dialog's buttonBox should send out the accept () signal.
bool acceptedConnection = connect (
this->dialog, SIGNAL (accepted ()),
this, SLOT (dataFilledIn())
);
qDebug ( acceptedConnection?
"acceptedConnection made":
"acceptedConnection FAILED"
);
//connecting rejectedConnection
bool rejectedConnection = connect (
this->dialog->buttonBox, SIGNAL (rejected ()),
qApp, SLOT (closeAllWindows())
);
qDebug ( rejectedConnection?
"rejectedConnection made":
"rejectedConnection FAILED"
);
bool acceptedConnection = connect (
this->dialog, SIGNAL (accepted ()),
this, SLOT (dataFilledIn())
);
qDebug ( acceptedConnection?
"acceptedConnection made":
"acceptedConnection FAILED"
);
//connecting rejectedConnection
bool rejectedConnection = connect (
this->dialog->buttonBox, SIGNAL (rejected ()),
qApp, SLOT (closeAllWindows())
);
qDebug ( rejectedConnection?
"rejectedConnection made":
"rejectedConnection FAILED"
);
To copy to clipboard, switch view to plain text mode
As you can see, i'm connecting everything in exacly the same way. But for some reason,
dataFilledIn () never gets called. The debugger tells me nothing about this; connect returns true.
The following is the header file. I hope you can find something that i've missed.
thanks in advance!
#ifndef DATADOWNLOADER_H
#define DATADOWNLOADER_H
#include <QWidget>
class HTTPObject;
class TorpiaAnalyserSettings;
class mainwindow;
class DataDownloader
: public QWidget { Q_OBJECT
public:
public slots:
void dataFilledIn ();
void intervalUpdated (int);
void maxRequestUpdated (int);
void rankStartUpdated (int);
void rankEndUpdated (int);
void useDownload (int);
private:
HTTPObject * downloader;
TorpiaAnalyserSettings * dialog;
mainwindow * window;
void connectSignals (int);
public: /*properties*/
int interval;
int maxRequest;
int rankStart;
int rankEnd;
};
#endif
#ifndef DATADOWNLOADER_H
#define DATADOWNLOADER_H
#include <QWidget>
class HTTPObject;
class TorpiaAnalyserSettings;
class mainwindow;
class DataDownloader : public QWidget {
Q_OBJECT
public:
DataDownloader (QWidget *);
public slots:
void dataFilledIn ();
void usernameUpdated (QString );
void passwordUpdated (QString );
void intervalUpdated (int);
void maxRequestUpdated (int);
void rankStartUpdated (int);
void rankEndUpdated (int);
void useDownload (int);
private:
HTTPObject * downloader;
TorpiaAnalyserSettings * dialog;
mainwindow * window;
void connectSignals (int);
public: /*properties*/
QString username;
QString password;
int interval;
int maxRequest;
int rankStart;
int rankEnd;
};
#endif
To copy to clipboard, switch view to plain text mode
Bookmarks