Hi,All:我新建了一个MainWindow工程,只添加了一个定时器,为什么编译会有如下提示,但是程序又是正常的。定时器也是正常工作的。
QMetaObject::connectSlotsByName: No matching signal for on_time_out()//....MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow){ui->setupUi(this);QTimer* timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(on_time_out()));timer->setInterval(100);timer->start();}//......................--private slots:void on_time_out();//...............void MainWindow::on_time_out(){//....}btw:我在ubuntu下面装的qt4.5的SDK,为什么莫名奇妙的在QtCreator中就不能复制了?每次都是重新启动IDE后才可以。
王鑫 <wang...@gmail.com>
--
您收到此邮件是因为您订阅了 Google 网上论坛的“Qt中文”论坛。
要向此网上论坛发帖,请发送电子邮件至 qt-c...@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 qt-china+u...@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/qt-china?hl=zh-CN 访问此网上论坛。
void QMetaObject::connectSlotsByName ( QObject * object ) [static]
Searches recursively for all child objects of the given object, and
connects matching signals from them to slots of object that follow the
following form:
void on_<object name>_<signal name>(<signal parameters>);
Let's assume our object has a child object of type QPushButton with
the object name button1. The slot to catch the button's clicked()
signal would be:
void on_button1_clicked();
See also QObject::setObjectName().
2009/12/16 王鑫 <wang...@gmail.com>: