当前位置:网站首页>QT implements the delete method of the container
QT implements the delete method of the container
2022-07-07 11:17:00 【InfoQ】
Summary of premises
- He can store at will , It has unlimited advantages .
- After deleting a certain data in the middle , Subsequent data will be automatically supplemented , No waste .
delete Method 1 of container :
for (std::vector<QCheckBox*>::iterator itvet = m_vetAddCheckBoxControls.begin(); itvet != m_vetAddCheckBoxControls.end(); itvet++)
{
if(*itvet)
{
delete *itvet;
*itvet = nullptr;
}
}
m_vetAddCheckBoxControls.clear();
delete Method 2 of container :
vector<QCheckBox*>().swap(m_vetAddCheckBoxControls);
summary
边栏推荐
- Go-Redis 中间件
- Activity生命周期
- 数据库同步工具 DBSync 新增对MongoDB、ES的支持
- 高考作文,高频提及科技那些事儿……
- 对比学习之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
- The post-90s resigned and started a business, saying they would kill cloud database
- The use of list and Its Simulation Implementation
- 互联网协议
- 测试开发基础,教你做一个完整功能的Web平台之环境准备
- MIF file format record
猜你喜欢
Seata 1.3.0 four modes to solve distributed transactions (at, TCC, Saga, XA)
RationalDMIS2022阵列工件测量
高考作文,高频提及科技那些事儿……
[STM32] actual combat 3.1 - drive 42 stepper motors with STM32 and tb6600 drivers (I)
[untitled]
2021-04-23
【pyqt】tableWidget里的cellWidget使用信号与槽机制
Debezium同步之Debezium架构详解
Mysql的json格式查询
Basic knowledge of process (orphan, zombie process)
随机推荐
Deconstruction and assignment of variables
测试优惠券要怎么写测试用例?
Network foundation (1)
Verilog 实现数码管显视驱动【附源码】
Une fois que l'uniapp a sauté de la page dans onlaunch, cliquez sur Event Failure resolution
[untitled]
Go slice comparison
简单介绍一下闭包及它的一些应用场景
uniCloud
How to remove addition and subtraction from inputnumber input box
Opencv installation and environment configuration - vs2017
[untitled]
Wallhaven wallpaper desktop version
Hash / (understanding, implementation and application)
RationalDMIS2022阵列工件测量
[untitled]
高考作文,高频提及科技那些事儿……
Deeply understand the characteristics of database transaction isolation
Transaction rolled back because it has been marked as rollback only
Rolling puddle Uni_ App (VIII)