1

When launching an embedded Qt application by specifying the directfb back-end, there is a way to pass arguments to it by using a specific syntax

./my-qt-app -qws -display directfb:960x720

This will change the resolution.

Let's say I'd like to remove the chrome from the application window. Since directfb has lots of options, how could I specify them via command-line? Should a look for the internal Qt implementation or use CLI arguments as specified by the DirectFB project?

UPDATE although there is a mechanism using colons to pass arguments to the display back-end, in the directfb case it won't work for resolution changes.

milton
  • 988
  • 6
  • 19
  • Delving into the source code, it seems that DirectFB parameters are processed by the Linux Screen Framebuffer plugin, implemented by `qt-4.8.5/src/gui/embedded/qscreenlinuxfb_qws.cpp`. It does receives parameters in a colon-separated list, such as `nographicsmodeswitch`, `genericcolors`, `tty=(.\*)` and `/dev/fb0` framebuffer device specification, however, display resolution is calculated via an environment variable named `QWS_SIZE` using the `"%dx%d"` format. – milton Oct 03 '13 at 20:29

2 Answers2

0

Best way to pass multiple arguments is to use the standard directfbrc mechanism, usually located under /etc or the directory determined by ${DFB_CONFIG_DIR} environment variable.

Also noticed later that things like the application window chrome are set inside Qt itself, not DirectFB.

milton
  • 988
  • 6
  • 19
0

As @milton answered one place is /etc/directfbrc and the other way is for example:

./app --dfb:window-surface-policy=auto

you can pass help to get all the commands:

./app --dfb:help
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
killdaclick
  • 713
  • 1
  • 10
  • 19