Qt embedded qwsserver

Source: Internet
Author: User

The QT embeded application does not strictly distinguish the server and client processes. If the startup parameters of a QT Process contain-qws, the process has the server Hu management function, known as qws server, of course, this process can also be used to create and display widgets like other QT processes. Only the server function can be used simultaneously.
This so-called server function is mainly implemented by the qwsserver object.

1. Management object of qwsserver


(1) keyboard and mouse Devices
Keyboard and mouse are input devices of the display system. In QT embedded, qwsserver initializes and manages the keyboard and mouse devices. Read key events and mouse events and send them to corresponding applications.
As for the display device screen in the diplay system, This is not managed by the qwsserver in a unified manner. To improve efficiency, each QT client can open this device and read and write it to the screen for display. But every QT client reads and writes to screen. Will the screen be messy? In QT, this part of work is managed by a diagonal corner of qwsregionmanager, which will be detailed later.

(2) qwsclient
It seems that the qwsserver and qwsclient classes should form a C/S structure. In fact, qwsserver represents a server socket. when QT client connects to the server socket of qwsserver, qwsserver generates a client socket to communicate with the socket of QT client. Qwsclient looks like a stub object, representing a QT client process. Each QT client process has a qwsclient in the qws server process.

(3) qwswindow
Qwswindow corresponds to the toplevel widget of QT client. Nontoplevel widgets are managed by each QT client. All toplevel widgets must be managed by the qws server, including the focus, altitude, and region of widgets.


(4) Others
Other global objects managed by qwsserver include qwsscreensaver and qwssoundserver.

2. qwsserver Initialization
Qwsserver Initialization is completed during the qapplication initialization process. The specific process is as follows:
Qapplication: Construct --> qt_init --> qwsserver: startup
Qwsserver: startup is a static function. The constructor that creates the Global Object qwsserver. qwsserver will initialize the Managed Objects in sequence.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.