Running Qt for Embedded Linux ApplicationsA Qt for Embedded Linux application requires a server application to be running, or to be the server application itself. Any Qt for Embedded Linux application can be the server application by constructing the QApplication object with the QApplication::GuiServer type, or by running the application with the -qws command line option. Applications can run using both single and multiple displays, and various command line options are available. Note that this document assumes that you either are using the The Virtual Framebuffer or that you are running Qt for Embedded Linux using the VNC protocol, or that you have the Linux framebuffer configured correctly and that no server process is running. (To test that the Linux framebuffer is set up correctly, use the program provided by the Testing the Linux Framebuffer document.) Using a Single DisplayTo run the application using a single display, change to a Linux console and select an application to run, e.g. demos/textedit. Run the application with the -qws option: cd path/to/QtEmbedded/demos/textedit ./textedit -qws
Additional applications can be run as clients, i.e., by running these applications without the -qws option they will connect to the existing server as clients. You can exit the server application at any time using Ctrl+Alt+Backspace. Using Multiple DisplaysQt for Embedded Linux also allows multiple displays to be used simultaneously. There are two ways of achieving this: Either run multiple Qt for Embedded Linux server processes, or use the ready-made Multi screen driver. When running multiple server processes, the screen driver (and display number) must be specified for each process using the -display command line option or by setting the QWS_DISPLAY environment variable. For example: ./myfirstserverapplication -qws -display "transformed:rot90:1" ./mysecondserverapplication -qws -display "QVFb:2" See the display management documentation for more details on how to specify a screen driver. Note that you must also specify the display (i.e., server process) when starting client applications: ./myclientapplication -display "QVFb:2" There is no way of moving a client from one display to another when running multiple server processes. Using the Multi screen driver, on the other hand, applications can easiliy be moved between the various screens. The Multi screen driver can be specified just like any other screen driver by using the -display command line option or by setting the QWS_DISPLAY environment variable. For example: ./myserverapplication -qws -display "Multi: QVFb:0 QVFb:1:offset=0,0 VNC:offset=640,0 :2" See the display management documentation for details regarding arguments. Command Line Options
|