首页| 论坛| 消息

标题:求问这段Qt代码,btn和layout的parent和owner分别是谁?
作者:ustone
日期:2019-06-20 08:51
内容:

QPushButton *btn1=new QPushButton;
QPushButton *btn2=new QPushButton;
QHBoxLayout *layout=new QHBoxLayout;
layout->addWidget(btn1);
layout->addWidget(btn2);
this->setLayout(layout);

在Qt里,parent和owner是一样的吗?
在Delphi里二者是不同的。

回复 发表
主题 版块