如题, 我的程序移植到arm板上后,connect根本没法用,哪怕是特简单的程序也一样
//mywin.h
#ifndef MYWIN_H
#define MYWIN_H
#include <QPushButton>
#include <QLabel>
#include <QDialog>
class mywin:public QDialog
{
Q_OBJECT
public:
mywin(QDialog *parent=0);
QPushButton *button;
QLabel *label;
public slots:
void textchange();
};
#endif // MYWIN_H
//mywin.cpp
#include "mywin.h"
mywin::mywin(QDialog *parent):QDialog(parent)
{
this->resize(320,240);
button = new QPushButton(this);
button->setText("Click Here!!!!");
button->setGeometry(20,150,200,75);
label = new QLabel(this);
label->setText("xxxxxxxxxxxxxxxxxxxx");
label->setGeometry(10,10,200,75);
connect(button,SIGNAL(clicked()),this,SLOT(textchange()));
}
void mywin::textchange()
{
label->setText("xxxxx");
}
//main
#include <QtGui/QApplication>
#include "mywin.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
mywin *window = new mywin;
window->show();
return app.exec();
}
这样的程序connect还是不行,是程序写的有问题吗?不过在windows和linux下都可以呀,还是设置的问题?
请大家帮帮忙,谢谢!