下面这个构造函数执行完,QTimer会自动释放吗?
CDisapperWgt::CDisapperWgt()
{
QTimer* burnTime = new QTimer(this);
burnTime->start(300);
burnTime->setSingleShot(true);
connect(burnTime, &QTimer::timeout, this,
[this]() {
setWindowOpacity(0.8);
QTimer* hideTime = new QTimer(this);
hideTime->start(1200);
hideTime->setSingleShot(true);
connect(hideTime, &QTimer::timeout, this,
[this]() {
close();
}
);
});
}