Qt app without window manager.
-
wrote on 22 Aug 2013, 20:15 last edited by
a window manager may be mandatory for gui app?
refer to source code, configure options etc. -
Hi and welcome to devnet,
I you don't want any window manager you would have to use i.e the linuxFB plugin.
The xcb plugins implies the use of x11 which is a window manager.
You will have to compile Qt 5 yourself to achieve what you want
-
wrote on 22 Aug 2013, 22:24 last edited by
Aha, the framebuffer again.
All the build configurations i've seen use xcb how do i configure Qt to use the linux framebuffer and then build it?
-
There's also DirectFB if your system supports it.
Just pass the -linuxfb to configure. For more options you can run configure --help
-
wrote on 24 Aug 2013, 17:04 last edited by
Until now i have tried three times to build but all times have failed.
I followed "Building Qt5 from Git":http://qt-project.org/wiki/Building_Qt_5_from_Git step by step.
My configuration is: ./configure -opensource -release -force-debug-info -confirm-license -static -qt-sql-mysql -qt-zlib -qt-libpng -qt-libjpeg -no-openssl -no-pch -linuxfb -nomake examples -nomake tests
and it fails. with this error:
@/home/user/Qt5.1Git/qt5/qtwebkit/lib/libQt5WebKitWidgets.a: could not read symbols: Malformed archive
collect2: error: ld returned 1 exit status
make[3]: *** [../../bin/QtWebProcess] Error 1
make[3]: Leaving directory/home/user/Qt5.1Git/qt5/qtwebkit/Source/WebKit2' make[2]: *** [sub-WebKit2-WebProcess-pro-make_first-ordered] Error 2 make[2]: Leaving directory
/home/user/Qt5.1Git/qt5/qtwebkit/Source'
make[1]: *** [sub-Source-QtWebKit-pro-make_first-ordered] Error 2
make[1]: Leaving directory `/home/user/Qt5.1Git/qt5/qtwebkit'
make: *** [module-qtwebkit-make_first] Error 2@At first i had -no-xcb but it failed saying that libqxcb was missing.
Edit: My g++ version is g++ (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3
-
Unless you explicitly need webkit you should just not build it. That will save time and hassle
-
wrote on 24 Aug 2013, 21:32 last edited by
Webkit would've ben nice.
Ok, i am trying to build without webkit but i have to delete the webkit directory because the configure script has no option to remove webkit from commpiling. "-no-web" and " nomake webkit " do no work.
-
IIRC, building webkit statically has always been problematic.
Also, don't forget the licensing implication of building Qt statically
-
wrote on 25 Aug 2013, 17:06 last edited by
Ahhh painful.
The error now is:
@make[3]: Leaving directory
/home/user/Qt5.1Git/qt5/qtbase/src/network' make[3]: Entering directory
/home/user/Qt5.1Git/qt5/qtbase/src/network'
make[3]: Warning: File../../.qmake.cache' has modification time 1.6e+04 s in the future /home/user/Qt5.1Git/qt5/qtbase/bin/qmake -o Makefile network.pro Project MESSAGE: perl -w /home/user/Qt5.1Git/qt5/qtbase/bin/syncqt.pl -module QtNetwork -version 5.1.2 -outdir /home/user/Qt5.1Git/qt5/qtbase /home/user/Qt5.1Git/qt5/qtbase <srcbase> = /home/user/Qt5.1Git/qt5/qtbase <outbase> = /home/user/Qt5.1Git/qt5/qtbase make[3]: Leaving directory
/home/user/Qt5.1Git/qt5/qtbase/src/network'
make[3]: Entering directory/home/user/Qt5.1Git/qt5/qtbase/src/network' make[3]: Warning: File
../../.qmake.cache' has modification time 1.6e+04 s in the future
/home/user/Qt5.1Git/qt5/qtbase/bin/qmake -o Makefile network.pro
Project MESSAGE: perl -w /home/user/Qt5.1Git/qt5/qtbase/bin/syncqt.pl -module QtNetwork -version 5.1.2 -outdir /home/user/Qt5.1Git/qt5/qtbase /home/user/Qt5.1Git/qt5/qtbase
<srcbase> = /home/user/Qt5.1Git/qt5/qtbase
<outbase> = /home/user/Qt5.1Git/qt5/qtbase
@it is constantly printing this. Looks like it is stuck in a loop printing this all the time.
-
You seem to have some problem with your system clock...
You should restart your build from a clean source tree and use a shadow build directory.
-
wrote on 26 Aug 2013, 07:46 last edited by
What do you mean by system clock? I am using a virtual machine for this.
The only thing that is not working from that guide is : scl enable devtoolset-1.1 bash
Now i restarted the system and started a new build under root without webkit.
-
This line
@make[3]: Warning: File `../../.qmake.cache' has modification time 1.6e+04 s in the future
@made me think of a clock problem
-
wrote on 26 Aug 2013, 12:25 last edited by
Finally some progress.
The build finished fine. I also built my first app. All ok.
But when i try to run the app i get an error:
@QFontDatabase: Cannot find font directory /usr/local/Qt-5.1.2/lib/fonts - is Qt installed correctly?@At this stage i haven't executed make install . A note on the guide says :
@Note: Installation is only needed if you haven’t used the configure options -developer-build or -prefix “PWD/qtbase”. Otherwise you can just use Qt from the build directory.@And i didn't put -developer-build in my build configuration.
Could this be the problem? -
You need to have this folder on your target computer
-
wrote on 26 Aug 2013, 13:56 last edited by
Which directory? PWD/qtbase or /usr/local/Qt-5.1.2/lib/fonts ?
What should it contain?I will also try a build with -developer-build but currently gitorious is down.
-
/usr/local/Qt-5.1.2/lib/fonts, you need it on your target computer, the one running without window manager. It must contain the font files
-
wrote on 26 Aug 2013, 15:14 last edited by
Ok, on dev platform it worked. The compiled binary is around 150MB.
In the target at first it failed because it couldn't find libicudata.so.48 libicuuc.so.48 libicui18n.so.48 which is strange because i compiled it statically.
Do i need any thing extra in the .pro file for static building the app ?After copying the requested libs in the target /usr/lib a new error appeared:
@QXcbConnection Could not connect to display@ -
You can build a static library but still have shared dependency.
IIRC you need to tell your application which plugin you want to use
-
wrote on 26 Aug 2013, 20:50 last edited by
Ok, but why is qt still trying to use xcb, i built it for linuxfb?
My build configuration is:
@./configure -opensource -release -force-debug-info -confirm-license -static -qt-sql-mysql -qt-zlib -qt-libpng -qt-libjpeg -no-openssl -no-pch -linuxfb -nomake examples -nomake tests
@ -
Just wild guess, but it might be that linuxfb is built additionally to xcb
11/35