Hi,
A really newbie question.
layout_->addWidget(buttonRun,1,0);
widget->setLayout(layout_);
connect(buttonRun,SIGNAL(clicked()),this,SLOT(runAlgorithm()));
QPushButton* buttonRun = new QPushButton(QString("Run"));
QGridLayout* layout_ = new QGridLayout;
layout_->addWidget(buttonRun,1,0);
widget->setLayout(layout_);
connect(buttonRun,SIGNAL(clicked()),this,SLOT(runAlgorithm()));
To copy to clipboard, switch view to plain text mode
connect() returns true, but the slot is never called. I'm pretty sure the signal is emitted, because
connect(buttonRun,SIGNAL(clicked()),qApp,SLOT(aboutQt()));
connect(buttonRun,SIGNAL(clicked()),qApp,SLOT(aboutQt()));
To copy to clipboard, switch view to plain text mode
works. I also think that the slot is defined properly, because if I do something like:
QObject::connect(this,
SIGNAL(runThisBastard
()),
this,
SLOT(runAlgorithm
()));
emit runThisBastard();
QObject::connect(this,SIGNAL(runThisBastard()),this,SLOT(runAlgorithm()));
emit runThisBastard();
To copy to clipboard, switch view to plain text mode
the slot is called properly.
Just in case here's my definition of the class:
class A
: public QObject,
public IHasPropertiesPage
{
Q_OBJECT
public:
....
public slots:
void runAlgorithm ();
...
};
class A: public QObject, public IHasPropertiesPage
{
Q_OBJECT
public:
....
public slots:
void runAlgorithm ();
...
};
To copy to clipboard, switch view to plain text mode
Any help would be greatly appreciated.
Bookmarks