Better_Software_Header_Mobile Better_Software_Header_Web

Find what you need - explore useful information and developer resources

Areas of Interest

Searching…

10 results

This video introduces the series, defines multithreading, and advises on the things you should know or learn before watching this video series.

This talk introduces you to the fundamentals of threading in Qt / qthread. We will discuss how threads, QObjects and events interact together; how a thread affinity of a QObject has a play in signals and slots connections; and how you can leverage the modern C++11 threading capabilities in your Qt application.

This video compares the multithreading facilities in Qt with those provided by the C++ standard library. Which one has a semaphore class? A thread pool implementation? A movable lock guard? Which one has the most convenient condition variable API?

In this video, you will learn about communicating between two threads using Qt signals and slots and what is really happening under the hood when you do that. With the help of didactic diagrams, you will learn different ways to set this all up, including possible pitfalls.

If you think bool is atomic (and therefore needs no mutex) or if you think volatile is useful in multithreaded programs, you should watch this video. Also, you will learn two different ways to implement asking for a QThread's run() method to finish.

This video provides answers to the following questions: Can you call methods on an object shared between threads? Can you call the same method in different objects? What about QObject, is it thread-safe?

After a short presentation of a QThread without an event loop, this video will tell you about threads with an event loop. This allows handling events for objects in secondary threads, which is necessary in order to be able to call slots on these objects.The video then presents two different ways to do this: creating both the thread and the worker at the same level, or encapsulating the thread into the worker.

In this video, you will learn about the three ways to create threads in Qt (did you know about QThread::create?). You will also learn how to wait for threads to finish, what can and cannot be done in a secondary thread, and how to properly destruct QObjects used in threads.

Have you ever wondered what the difference is between QWidget::repaint() and QWidget::update()? You may even have heard that update events collapsed into just one event in the event loop, which might make you ask the question on whether there are other events merged together. Let's debug into the Qt source code to get an answer.

In this second episode on layout managers, we will discuss how to make widgets stretch, and how to get spaces into your layout. We will discuss that both when you code it in C++, and when you do it in Qt Designer.