好的,所以当我运行它时(写出来只是为了显示问题):
#include <QtGui/QApplication>
#include "mainwindow.h"
#include <QtGUI>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QWidget *window = new QWidget;
QPushButton *MainInter = new QPushButton("Push me!",window);
QObject::connect(MainInter,SIGNAL(released()),MainInter,SLOT(move(100,100)));
window->resize(900,500);
window->show();
return a.exec();
}
为什么单击时按钮不移动?:)