我在 FLeftBar(QToolBar)中加入了两个xsToolButton的对象(继承至QToolButton)
我通过下面的代码得到加入的xsToolButton对象, QMessageBox::information可以正常运行
可是一到connect处,程序运行时就挂掉了
编译没有问题
望高手指教一下
int I;
QList<xsToolButton *> buttons = FLeftBar->findChildren<xsToolButton *>();
for(I = 0; I < buttons.count(); I++)
{
QMessageBox::information(this, "tips", buttons->text());
QObject::connect(buttons, SIGNAL(ChangeDrawType(DrawType)),
FViewer, SLOT(ChangeDrawTypeOne(DrawType)));
}