当前位置:网站首页>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
边栏推荐
- Deeply understand the characteristics of database transaction isolation
- 关于在云服务器上(这里用腾讯云)安装mysql8.0并使本地可以远程连接的方法
- 对比学习之 Unsupervised Learning of Visual Features by Contrasting Cluster Assignments
- Case study of Jinshan API translation function based on retrofit framework
- Wallhaven wallpaper desktop version
- 90后,辞职创业,说要卷死云数据库
- 基于Retrofit框架的金山API翻译功能案例
- A simple example of delegate usage
- [STM32] actual combat 3.1 - drive 42 stepper motors with STM32 and tb6600 drivers (I)
- TDengine 社区问题双周精选 | 第二期
猜你喜欢

uniCloud

关于测试人生的一站式发展建议

Input type= "password" how to solve the problem of password automatically brought in

Antd select selector drop-down box follows the scroll bar to scroll through the solution

【pyqt】tableWidget里的cellWidget使用信号与槽机制

Opencv installation and environment configuration - vs2017

解决VSCode只能开两个标签页的问题

VR development optimization

普通测试年薪15w,测试开发年薪30w+,二者差距在哪?

JS add spaces to the string
随机推荐
科普达人丨一文弄懂什么是云计算?
[untitled]
How to remove addition and subtraction from inputnumber input box
Poj1821 fence problem solving Report
A case of compiling QT file qmake compiling script
变量的解构赋值
MIF file format record
[C #] the solution of WinForm operation zoom (blur)
Process control (creation, termination, waiting, program replacement)
Qtcreator sets multiple qmake
测试优惠券要怎么写测试用例?
[untitled]
Static semantic check of clang tidy in cicd
Drive HC based on de2115 development board_ SR04 ultrasonic ranging module [source code attached]
请问申购新股哪个证券公司开户是最好最安全的
uniapp 在onLaunch中跳轉頁面後,點擊事件失效解决方法
Hash / (understanding, implementation and application)
Unity script generates configurable files and loads
Array object sorting
Case study of Jinshan API translation function based on retrofit framework