Hi i have the following code and it does not even display the message box, what am I missing?
DialogNuevoPeriodo.h
class DialogNuevoPeriodo
: public QDialog{
public:
...
private slots:
...
void setCalendarYear
(const QString &);
...
private:
...
};
class DialogNuevoPeriodo : public QDialog{
public:
...
private slots:
...
void setCalendarYear(const QString &);
...
private:
QLabel *lAnio;
...
};
To copy to clipboard, switch view to plain text mode
DialogNuevoPeriodo.cpp
#include "DialogNuevoPeriodo.h"
DialogNuevoPeriodo
::DialogNuevoPeriodo(QWidget *parent
) ...
...
connect(leAnio,
SIGNAL(textChanged
(const QString &)),
this,
SLOT(setCalendarYear
(const QString &)));
...
}
...
void DialogNuevoPeriodo
::setCalendarYear(const QString &text
){ "something"
);
}
...
#include "DialogNuevoPeriodo.h"
DialogNuevoPeriodo::DialogNuevoPeriodo(QWidget *parent)
: QDialog(parent){
...
leAnio = new QLineEdit;
leAnio->setValidator(new QIntValidator(1800, QDate::currentDate().year(), this));
...
connect(leAnio, SIGNAL(textChanged(const QString &)),
this, SLOT(setCalendarYear(const QString &)));
...
}
...
void DialogNuevoPeriodo::setCalendarYear(const QString &text){
QMessageBox::warning(this, tr("something"),
"something"
);
}
...
To copy to clipboard, switch view to plain text mode
it just does nothing in the slot why is that? thanks
Bookmarks