Jesper K. Pedersen
269 results
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.
As a user, there is nothing more annoying than a dialog saying "192.168.0.256 is not a valid IP address". Instead of allowing your user to type in invalid data, help them instead. There are three tools in your toolbox for that, namely input masks, validators and completers.
Adding a new widget to your toolbox might be as simple as subclassing from QWidget and add two child widgets plus a layout, or it might be a multi-month job where you need to polish every single pixel. In any case there are a few things to think about, and that is exactly what we will discuss in this episode.
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.
In this first of two episodes on layout managers, we will introduce the layout manager. In addition to that we will show an example where you can NOT use a layout manager. Finally, Jesper will tell a story about ones he had to implement a motif compatible layout manager in Qt.
In this fourth episode in the tour of common widgets in Qt, we will talk about item widgets - more specifically QComboBox and QListWidget.
In this mini tour of the most common widgets in Qt, we will turn our attention to widgets organizing other widgets, namely: QGroupBox, QTabWidget, QToolBox, QStackedWidget, QScrollArea and QAbstractScrollArea.
In this episode, we will continue looking at the most common widgets in Qt, focusing our attention to QPushButton, QRadioButton, QCheckbox, QSlider, QProgressBar and QSpinBox.
In this and the next three episodes, we will look at the most common widgets in Qt, their API, how you are supposed to work with them, and most noticeable some of the hidden gems.
In this short episode, Jesper will provide you with a few links to some Qt Widgets and More episodes to watch before he returns with the next module. In addition to that, he will offer a few parting notes on when to use Qt Designer at all.