Unsolved Deploy windowed application with Qt on Raspi 3
-
Hi all,
I'm using Qt 5.1.5.2 for cross-compiling on a raspi 3. Until here all works fine, I can compile.
But my problems comes when I want to run my application. I can only do it using legacy drivers.This also leads that when I ran my application, I don´t have a window surrounding it, just the app and its button floating on the screen. I've had to mess a bit with the graphic library links to make my application works.
The question here is, how can I run my application in a normal window from operative system? At my current Desktop version everything works like a charm, but in the raspi I don't have any frame encapsulating my program. That also means, that I don't have close button.
What can I do to execute my app like if was in my desktop pc?
Thank you all.
-
Dear all,
I can't take screenshots on my raspi because this application is over my desktop and not in it, but despite it's nasty I let you a picture of whats happening to me.
Thanks!
-
@guille31794 What OS is running on your device? Do you have X11 running on it?
-
@jsulm I'm on an installation of Raspberry Os Bulls Eye 32 bits full (with desktop). I installed all the dependencies related with libxcb.so so I think yes, I should have X11 running, but later today I'll make some test and post them here.
I think I may have some linking problem between the libraries. -
@guille31794 Do you also have any window manager or desktop environment running? Showing window decorations is something done by window manager.
-
@jsulm sure. I have the default one from Raspberry OS. It's a version of LXDE.
-
@guille31794 Then you app should have window decoration. Do you switch your app into full-screen mode?
-
@jsulm the application doesn't run maximiced. I'm running over EGLFS, that for what I've read is windowsless, it runs apart from the current system windows manager. More on that here: https://doc.qt.io/qt-6/embedded-linux.html
The key here to run my application windowed is how can I configure my X11 instalation to use xcb plugin. It's more resources hungry and heavy to run, but in this case, having a couple of dialog windows emerging sometimes and a virtual keyboard that has to be deployed, it's better to run in a windowed environment.Currently when I try to deploy using xcb plugin it says the following:
qt.qpa.xcb: could not connect to display qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
That error I asume is have to be with the linking of the libraries, because they're all installed.
Anyway, if I can, I'll try to deploy the keyboard together with the application and try to set the varaibles for height and width to just try adjusting the screen. The final deployment will be over Raspberry pi official touchscreen. Perhaps I can just change the way the dialogs are shown and instead a new window, to use a new frame and avoid several windows at the same time. I need to make some experimenting first in this way. -
@guille31794 said in Deploy windowed application with Qt on Raspi 3:
qt.qpa.xcb: could not connect to display
How do you start your application?
Do you start it with sudo? -
@jsulm not really. I usually run it from the host machine, using qt with the argument of the platform I want, in this case -platform eglfs or xcb for the error I posted.