首页| 论坛| 消息

标题:constructorCount()为什么没有呢
作者:djm488
日期:2021-01-16 09:22
内容:

MainWindow::MainWindow(QWidget *parent): QMainWindow(parent), ui(new Ui::MainWindow){
ui->setupUi(this);
qDebug()constructorCount();//l输出0
qDebug()


#1 [gnibuoz 01-17 16:00]
看网上说法应该是这个【构造函数个数】仅统计 被标记为【Q_INVOKABLE or Q_SCRIPTABLE】的构造函数,原文如下:
Not a bug. As you've discovered, constructors are only extracted if they are marked Q_INVOKABLE or Q_SCRIPTABLE. The same applies to rergular methods, except that slots and signals are automatically invocable.
链接是这个: https://bugreports.qt.io/browse/QTBUG-76348
#2 回 gnibuoz 的帖子 [djm488 01-18 08:23]
gnibuoz:看网上说法应该是这个【构造函数个数】仅统计 被标记为【Q_INVOKABLE or Q_SCRIPTABLE】的构造函数,原文如下:
Not a bug. As you've discovered, constructors are only extracted if they are marked Q_INVOKABLE or Q_SCRIPTABLE. The same applies to rergular methods, .. (2021-01-17 16:00) 
了解了,谢谢

回复 发表
主题 版块