0

Ok I have Qt-Creator running my app in debug mode. I am able to stop at SOME breakpoints; however, the code I really want to debug is invoked via the signal/slot mechanism as follows:

connect(saveFileButton, SIGNAL(clicked()), this, SLOT(saveParameters()));

I set a few breakpoints in saveParameters() and the breakpoints are never hit.

How can I verify that the saveParameters slot is actually connected to the saveFileButton clicked signal at runtime?

4

2 回答 2

2

true如果连接成功,connect返回布尔值。
此外,如果 Qt Creator 控制台中的连接失败,您应该会看到出现此类错误的日志。如果您对调试器正常工作有任何疑问,
也可以qDebug("Something")在里面添加。saveFileButton

于 2013-07-21T07:44:35.353 回答
0

运行应用程序时,请阅读应用程序输出。如果无法建立连接,则会出现如下错误消息:

QObject::connect: No such slot MainWindow::saveParameters() in ../test/mainwindow.cpp:39
于 2013-07-21T07:40:21.337 回答