Building Qt application for a custom linux distribution (with Buildroot) - window manager problem
-
Welcome everyone!
I'd like to ask you a question concerning building Qt application for a custom embedded linux distribution that I built with the buildroot tools.
I built a basic window Qt application, with a 'Hello World' label. Of course to do so, I used qmake -project + qmake which in turn was built by the buildroot tools for a selected architecture. I enabled (in the menuconfig) the Qt (4.x) standard X11 with Gui Module and the X.org X Window System with xorg-server and rather all necessary libraries, required by Qt for Embedded Linux. The application is being built and installed on the target mechine (which is RPi-3 64bit) without any errors by make all tool from buildroot.
Here are the listings from the main files (without .pro file, if it is necessary I can post it as well but it is considerably long):
packages/helloworld/helloworld.mk:
HELLOWORLD_VERSION:= 1.0.0 HELLOWORLD_SITE:= /home/marek/Projects/qt-embedded/helloworld HELLOWORLD_SITE_METHOD:=local HELLOWORLD_INSTALL_TARGET:=YES define HELLOWORLD_CONFIGURE_CMDS cd $(@D); $(TARGET_MAKE_ENV) $(QT_QMAKE) endef define HELLOWORLD_BUILD_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) endef define HELLOWORLD_INSTALL_TARGET_CMDS $(INSTALL) -D -m 0755 $(@D)/helloworld $(TARGET_DIR)/bin endef define HELLOWORLD_PERMISSIONS /bin/helloworld f 4755 0 0 - - - - - endef $(eval $(generic-package))
main.cpp:
#include <QApplication> #include <QLabel> #include <QWSServer> int main(int argc, char **argv) { QApplication app(argc, argv, QApplication::GuiServer); QLabel label("Hello world"); label.show(); return app.exec(); }
When I run the Openbox window manager and execute my helloworld application it obviously runs, but I cannot interact with it and I get a problem shown in the attached picture (see below). The xterm was built also within this distribution. I can move the terminal but it brushes my application, so the mouse pointer does :) You can see the application in the top-left corner of the screen, but if I move the cursor over there it cleans it.
I'm looking forward for any help coming from you. I do not know what I could do more. I'd like to run this application like analogously it happens on my host machine (in this case it is ubuntu 16.04), i.e. to interact with it, add eventually some controls etc.
Thank you in advance!
Marek