Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
如图片所示,正常编译而没有报错,这不合理啊!
这不是赋值,是构造函数的参数啊,QTimer的构造函数是QTimer(QObject *parent = nullptr),你这样就把这个new出来的QTimer作为它的parent传给它的构造函数了,编译当然没问题,在运行时因为m_timer应该会早于它的parent被销毁所以也没有问题