Creating an application using XCB
Hello to everybody,
I'm new here and I'm srongly searching for a solution for my problem:
I would like to write a simple GUI application using XCB.
Has anybody a small example where I can learn from or is there a group in this forum where I can find more?
Thanks a lot in advance!
There are samples on the site
I would like tocreate a QT project using the QT Creator whizzard. This means:
- creating a project (e.g QT Widgets) application.
- designing a window using the Forms wizzard.
then I create the programm, compile and link it. at least Starting the programm on the Raspberry and everything is fine ;-)
Do you think this is possible? Or must I write an application line by line using an editor?
Tanks for this hint. Buuut....
How can I make this by using QT Crator?
you cannot make XCB windows in Qt Designer :)
well you could draw them, then create an app that can take the gui files and create XCB calls from it.
Why not just get this
and use Qt directly on the pi?
(and forget about XCB)
I use a Raspberry and a 3.2" display having a SPI interface. But Standard QT is having a HDMI interface. Thats my problem.
you don´t write a special application for XCB. You can use the
xcb platform pluginto run a normal QWidget application under x11.
./myProg --platform xcb
thanks for your answer.
Sorry but I do not understand.
I'm not really familiar with QT. But I think xcb is already installed.
- There is a directory : \SysGCC\Raspberry\arm-linux-gnueabihf\sysroot\usr\include
- and a QT Project Include file : qt_lib_xcb_qpa_lib_private.pri
can I use this pri file?
Where must I insert ./myProg --platform xcb.
@K-Str If you write a Qt application you usually don't care whether it uses XCB, win32 API, frame buffer or what ever. This is handled for you by Qt. This is one of the reasons why Qt exists. You just need to use the correct platform plug-in as @sneubert said, please check the link he provided. No need to use XCB directly.
"But Standard QT is having a HDMI interface" - Qt does not have such interfaces. Is X11 running on your Raspberry Pi and if so is it running on this SPI display? If it does then your Qt app should work there.
Hello to all,
thanks a lot for your hints.
sneubert recommended to use the following command to run it:
./applicationName --platform linuxfb:fb=/dev/fb1
This works fine.