Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Application Development with Qt Creator - Second Edition
  • Toc
  • feedback
Application Development with Qt Creator - Second Edition

Application Development with Qt Creator - Second Edition

4 (25)
close
Application Development with Qt Creator - Second Edition

Application Development with Qt Creator - Second Edition

4 (25)

Overview of this book

This book is great for developers who are new to Qt and Qt Creator and who are interested in harnessing the power of Qt for cross-platform development. If you have basic experience programming in C++, you have what it takes to create engaging cross-platform applications using Qt and Qt Creator!
Table of Contents (15 chapters)
close
14
Index

Multithreading in Qt

A thread is a single line of execution within a single application. Nearly all of today's operating systems are multithreaded; that is, your application can have more than one concurrent line of execution at a time. Multithreading is a key way to improve the responsiveness of an application, because most processors today can execute multiple threads in parallel and operating systems are optimized to share resources among multiple threads.

Qt supports multithreading over the host operating system through three key classes:

  • QThread
  • QSemaphore
  • QMutex

The first represents a single thread of execution, while the latter two are used to synchronize thread access to data structures.

By design, your application runs entirely on the user thread, a single thread of execution that starts when your application starts. You can create new threads of execution (which cannot manipulate the user interface) by subclassing QThread and overriding the run method. Then, when you need to perform...

bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete