PDA

View Full Version : Qt without x11



Amrutha
21st April 2017, 13:51
I would like to use Qt without x11 in ubuntu 16.
Can anyone please suggest me possible solutions?

Thanks in advance

d_stranz
21st April 2017, 20:28
X11 is required for Qt on linux platforms as far as I know. All of Qt's GUI goes through the platform abstraction layer into the X11 drivers.

wysota
21st April 2017, 22:02
Depends what you want to use. Qt GUI apps on Linux by default use xcb (aka X11) platform plugin, but:
1. If you don't need GUI at all, disable QtGui module (QT -= gui) in your project
2. If you need GUI but not X11 (e.g. when using wayland), use a different platform plugin (e.g. add -platform wayland to command line arguments for your app)

Amrutha
23rd April 2017, 21:47
i need to use qt for displaying to a touch screen using rasberry without x11..before implementing in rasberry pi i wanted to try in ubuntu..
I would be really grateful if anyone could guide me properly for displaying in a rasberry pi using qt without x11..

wysota
24th April 2017, 08:46
i need to use qt for displaying to a touch screen using rasberry without x11..
In that case run your app with -platform eglfs. Just make sure Pi is not running X11 at that time.


before implementing in rasberry pi i wanted to try in ubuntu..
On Ubuntu you can use the default QPA X11 plugin.

Amrutha
24th April 2017, 09:32
In that case run your app with -platform eglfs. Just make sure Pi is not running X11 at that time.


On Ubuntu you can use the default QPA X11 plugin.

when i am trying to run with platform eglfs i am getting an error in config file.
it is showing as configure cannot be found
I am new to qt..
can you please guide me how to configure in qt?
when i checked i am not having configure.exe in my folder..configure.prf is present..is it a problem?

wysota
24th April 2017, 18:48
"-platform eglfs" is a runtime option for an application you want to execute on Raspberry Pi. Configure has nothing to do with this.

You can follow e.g. this tutorial to get Qt running on Pi: https://www.ics.com/blog/configuring-qt-creator-raspberry-pi