Qt/Embedded Window System Architecture

Master Process

Qt/Embedded must have a master process that handles device input and paintable region management. Any process may be nominated as the master process by passing the -qws flag or constructing QApplication as the QApplication::GuiServer type.

The master and client Qt/Embedded processes communicate via a PF_LOCAL socket. There is also a shared memory area that contains the regions of each top-level widget.

The Qt/Embedded model minimises inter-process communication by performing as much work as possible in the client process. For example all drawing and child widget region operations are performed by the client process without any communication with the master process necessary.

Window Management

The master process maintains the regions that each top-level widget may paint within. Performing one of the following operations on a top-level widget causes the paintable regions of each top-level widget to be updated:

All of the above operations require one round-trip message to the master process. Spontaneous expose events are also generated for any widgets that have some part of their client area exposed by one of the above operations.

Sub-widget regions are not maintained by the master process, so performing the above operations on child widgets requires no communication with the master process.

Device Input

The master process is responsible for reading device input and dispatching the events to the active client. Key events and mouse/pointer events can be handled.


The master process controls QCop message delivery. When a client creates a QCop channel, the master process adds the client to the list of clients subscribed to channel. QCop messages are sent to the master process which then forwards the messages to each client that is listening on the channel.


QPainter is essentially a wrapper around the Gfx graphics system. The QGfx class is a high-level painting abstraction. Sub-classes implement the actual drawing functionality, in particular, QGfxRaster implements painting on a raster device. Hardware acceleration is usually achieved by sub-classing QGfxRaster, implementing the accelerated functions where possible, and falling back to the QGfxRaster implementation for functions unsupported in hardware.

Qt/Embedded clients paint directly to the framebuffer. The low-level graphics system (QGfx) handles clipping against the top-level regions maintained in shared memory. No communication with the master process via the socket is performed.

Copyright © 2005 TrolltechTrademarks
Qt version 2.3.10