Game Programming using Qt 5 Beginner's Guide - Second Edition
by Pavel Strakhov, Witold Wysota, Lorenz Haas
Devices
QFile is really a descendant class of QIODevice ("input/output device"), which is a Qt interface used to abstract entities related to reading and writing of blocks of data. There are two types of devices: sequential and random access devices. QFile belongs to the latter group; it has the concepts of start, end, size, and current position that can be changed by the user with the seek() method. Sequential devices, such as sockets and pipes, represent streams of data—there is no way to rewind the stream or check its size; you can only keep reading the data sequentially—piece by piece, and you can check how far away you currently are from the end of data. We will work with such devices in Chapter 7, Networking.
All I/O devices can be ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access