• 4714阅读
  • 1回复

[提问]请问,我移植到arm板上的程序connect失效怎么解决?是还需要特殊的设置么? [复制链接]

上一主题 下一主题
离线xff2016
 

只看楼主 倒序阅读 楼主  发表于: 2012-08-31
如题, 我的程序移植到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下都可以呀,还是设置的问题?
请大家帮帮忙,谢谢!
离线hopstone
只看该作者 1楼 发表于: 2012-10-18
楼主,我也碰到同样的问题,你的问题解决了么?
快速回复
限100 字节
 
上一个 下一个