Wednesday, 7 August 2013

Qt cant modify a label into de ui

Qt cant modify a label into de ui

I am creating a popuo window that can change the message that shows. I
have the next class
class NoPutPort : public QDialog, public Ui::NoPortPut
{
Q_OBJECT;
public:
NoPutPort(QWidget *parent=0) {
setupUi(this);
}
~NoPutPort(void) {}
void putPort(QString a){
ui.label_2->setText(a);
}
private:
Ui::NoPortPut ui;
};
The problem if when I call the method putPort, the application crash and I
dont know why. If I put ui.label_2, it dont crash, but when I access to
the object to modify it, it crash.
Anyone knows how can I modify the label correctly?

No comments:

Post a Comment