KDAB_Tree_Header_Mobile KDAB_Tree_Header_Web

Trusted Software Excellence since 1999

Jesper K. Pedersen

278 results

In this episode we will look at the process for making your application ready for being translated, plus how the translation tools works.

In this episode, Jesper discusses some non-trivial painting code. It includes coordinate transformations, discussions of cosmetic pens and more.

Sometimes the simple questions come with a super complex answer. Question: How do you draw a rectangle around a piece of text? Answer: Uh ohh, hold my beer (or coffee or ...) ..... 

Printing in Qt is easy! Learn how in this episode.

In this episode I'll implement a simple bar chart, which involves painting the actual bars.

With your current knowledge of QPainter, you would likely have a hard time if I asked you to draw an analog clock. Obviously, you know you can draw a line between two points with drawLine, but how do you determine these two points for say the 5 o'clock marker?

Where are the pixels for the outline of a rectangle drawn? Inside the rectangle? Outside the rectangle? Or in between?

In this episode, we will look at the operations that QPainter offers, and especially, try to understand the drawText() method which is far from trivial.

Qt has a poor man's version of theming your application by changing the color schemes. It is most certainly used in KDE, but besides that I've never really seen it in action. It does, however, have quite some impact on how you do something as simple as changing the background color of a push button. Watch this episode to learn more.

In this episode you will learn how to draw the outline and the filling of, say, an elipse; the difference between QPixmap and QImage; how to (almost) implement your own screen saver with a wobbling text with a color gradient through it, and more.

In this module, we will talk about painting your own widgets, and we will see a number of techniques and classes involved in this. We will start with this episode where we discuss the very simplest way to get some pixels on the screen.

When you press Ctrl+k and type a class name, you are asked which version of Qt you want to see that documentation for. 99% of the time, the answer is likely "The latest". You can actually make it show the latest by default, but it is well hidden.

One of the standard communication protocols for web services is SOAP, which is basically XML over HTTP. I wrote an opensource library called KDSoap which makes it easy to do SOAP with Qt (both client-side and server-side). In this video you will see how, starting from a web service which provides a WSDL file to describe its API, KDSoap can generate code to make synchronous or asynchronous calls to the web service.

A very common communication protocol is REST, which is simply JSON over HTTP. Qt has all the building blocks for this, with QJsonDocument for JSON and QNetworkAccessManager for HTTP. In this video, you will see a real-world library that makes REST requests to a web service called TMDB (movie database), as an example.

This video shows an alternative way to a DBus client using Qt, using the convenience of blocking calls but without blocking the GUI thread: all blocking calls are done in a separate thread.

This video shows how to implement a DBus client using Qt, using generated code so that calls and their signature are checked at compile time. Special care is taken not to block the GUI thread, using asynchronous handling only (via signals and slots, and a queue of pending requests)

This video shows how to implement a DBus server using Qt, in order to communicate between two processes. The benefits of using DBus include the fact that it's a standard communication protocol on Unix systems especially, and the ability for Qt to generate classes the client can use to make calls in a type-safe way. For now we'll test the server using the qdbus command-line client, the next video will show how to make calls from C++.

In this video, you will see an alternative to the asynchronous handling done in the previous video. If the socket is managed by a separate thread, it becomes possible to implement the protocol in a synchronous manner, which is much easier.

In this video, you will learn how to use the JSON classes in Qt (5 or later) to implement a communication protocol between two processes. Special care is taken not to block the GUI thread in the graphical client application, using asynchronous handling only (via signals and slots, and a queue of pending requests).

In this video, you will learn how use Qt (5 or later) to develop a server and a client application which communicate using a local socket. You will learn how to handle the various issues that arise from systems made of multiple processes. For instance, what if the client tries to connect before the server is running? What if the server is restarted? What if the server crashes? What if the server is started twice?

JesperKjaerPedersen

Jesper K. Pedersen

HR Director / COO