我们编辑ui文件时候 可以这样使用槽函数, on_objectName_signal(args) ; 非常简便, 文档说明是下面
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();
就是说我们想这样方式使用时 把这个object关联一下, 它所有的孩子我们就可以以这种方式命名槽了