Jesper K. Pedersen
278 results
This video shows an application that makes synchronous (blocking) and asynchronous (non-blocking) calls from the main thread of a graphical Qt application, and how this affects the user experience.
This video introduces the series, defines the types of inter-process communication and the technical alternatives that will be presented, and advises on what are the things you should know or learn before watching this video series.
Qt has a property system that is used from many places, including Qt Designer, QML, and other language bindings. It can, however, also be very useful on its own, as in the example I show towards the end of this episode. Watch this episode to get a better understanding of how it all fits together.
The class QVariant is a truly important class in Qt, which offers the possibility to provide anything to a function, or return anything from one. If you know modern C++, then it is a bit like std::any, and if you are more familiar with plain C, then you will find some resemblances to its union.
Qt offers a rather wide spectrum of classes for accessing contents of files, including reading and writing bytes to parsing XML, JSon, and CBor files. In addition to that, it also has useful API's for copying files, getting file information (like is it readable), and traversing whole directories. Learn about all that and more in this episode.
Qt comes with a number of container classes. But how do you use them properly, what are the constraints on items you put into them etc. etc.?
Regular expressions is a very powerful tool to parse strings and validate user input. Qt has support for regular expressions via the class QRegularExpression and its helpers.
Qt comes with a string class, as does C++ itself (namely std::string). But in contrast to C++'s string class, Qt's counterpart has lots of powerful utilities built in, which makes it easy to do string operations. Learn all about these in this episode.
In this episode I'll have a look at the tool called pre-commit. It's a tool, as the name suggests, for setting up (and reusing) git pre-commit URLs.
Sometimes a signal fires too often, and, as a result, your user interface feels sluggish. A solution to this is often a timer to compress the signal. In this episode, I'll show you a class from KDToolBox which makes such code easier to read.
Add some colors and some additional information so your QDebug() are more useful and easier to spot.
The class QMainWindow provides all the parts needed to create a main window for your application, namely toolbars, docking widgets, a menu bar, and menus. In this episode, we will look at how they all fit together.
Qt provides built-in dialogs for common use cases including file selection, color/font choosers, simple text input (like asking for names), message display, and progress indication. It also includes a framework for implementing wizards. This episode covers all these dialog types and demonstrates their practical usage in Qt applications.
In Qt, you can create a top level window, simply by providing nullptr as the parent. However, we still have a class called QDialog specifically for creating dialogs. Among other things it offers to wait for the dialog to be completed before your code continues execution.
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.
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.
The task was simple: Add double click to a push button - with the added bonus of it not emitting the normal clicked if there is a double click. OK, this sounds trivial, right? Well no, it wasn't entirely. To get it right you have to understand quite a bit of both signals/slots and the event system. This episode explains.
In this last episode on "Show me your IDE", we now look at visual studio code.
In April 2022, we put out an April's Fools where we demonstrated the AI integration in Qt creator. Fortunately within the same year reality surpassed us, and now we are all much more productive thanks to ChatGPT. You may ask, how does it know all the stuff it knows? Well, it obviously watched Qt Widgets and More! I did, however, find that it had a few glitches, so this episode will be fixing those, but telling it about all the best practices around Qt Widgets development
If you ship resources (say icons, translations etc) with your application, then you risk that your user deletes them. And then, what do you do? The alternative is to compile those resources into your binary, which fortunately is super easy with Qt.


