O'Reilly logo

Game Programming using Qt 5 Beginner's Guide - Second Edition by Lorenz Haas, Witold Wysota, Pavel Strakhov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required