当前位置:网站首页>File operations in QT
File operations in QT
2022-06-28 09:22:00 【A raindrop pouring into the sea】
1.Qt in IO How to handle the operation
Qt The unified interface simplifies the operation mode of files and external devices
Qt The file in is considered a special external device
Qt The file operation in is the same as that of the external device
2.IO Key function interfaces in operation
Turn on the device :bool open(OpenMode mode)
Reading data :QByteArray read(qint64 maxSize)
Write data :qint64 write(const QByteArray& byteArray)
Turn off the device :void close()
IO The nature of operation : Data read / write of continuous storage space
3. Type of device in
Sequential access device :
Data can only be read and written from the beginning , The read / write location of data cannot be specified
Random access device :
It can be located at any position for data reading and writing (seek function)
Qt in IO Inheritance hierarchy diagram of equipment :
QFile yes Qt Class used for file operation in
QFile Object corresponds to a file on the computer
QFileInfo Class used Read file attribute information :
边栏推荐
- 全链路业务追踪落地实践方案
- 满电出发加速品牌焕新,长安电动电气化产品吹响“集结号”
- Android studio interview preparation
- Divide and rule classic Hanoi
- DEJA_VU3D - Cesium功能集 之 052-模拟卫星轨道(高空)效果
- Analysis of prepaid power purchase device
- Two interview demo
- RESTful风格
- How do I open an account on my mobile phone? Is it safe to open an account online now?
- Edit the live broadcast source code with me. How to write the live broadcast app code
猜你喜欢
随机推荐
从知识到智慧:知识图谱还要走多远?
网上炒股开户安不安全?
Do static code blocks always execute first? The pattern is smaller!!!
Full link service tracking implementation scheme
A strange execution plan. One table in the association query is not associated with any other tables
Basic content learning of software testing (I)
Fire fighting work and measures in Higher Vocational Colleges
Implement global double finger long press to return to the desktop
Explain observer mode
DEJA_ Vu3d - 052 of cesium feature set - Simulation of satellite orbit (high altitude) effect
理解IO模型
What is online account opening? Is it safe to open an account online now?
When the interviewer asks you to write binarysort in two ways
手机买同业存单基金开户选哪家证券公司比较好,比较安全呢
1182: effets de la photo de groupe
The private attribute of this class can be used directly? New() in use!!!
Edit the live broadcast source code with me. How to write the live broadcast app code
STL -- binder
Potential safety hazards in elderly care facilities
Protection range and optimization of motor protector for hoist equipment









