【发布时间】:2011-08-17 16:53:25
【问题描述】:
我一直在关注这个帖子:Memory management in Qt?
QPushButton::QPushButton ( const QString & text, QWidget * parent = 0 )
因此,在一个示例中,我看到了以下创建按钮对象的方法。我关心的是第二个参数,“parent”,一个 this 指针已经被传递到那里,这是否意味着这个小部件是它自己的父级?我知道我遗漏了一点,请指出。
button1 = new QPushButton("Button1", this);
【问题讨论】:
标签: qt