Qt + Raspbian with LCD display module(4DPi-32) primary display problem



  • Hello,

    I installed Qt in my Raspbian following this tutorial.

    I am using Raspbian 2015-02-16-raspbian-wheezy.img image. I successfully compiled Qt platform and I am able to run Qt applications in my Raspberry Pi.

    However, there is a problem when I use 4DPi-32 display module as primary display instead of HDMI output. I installed 4DPi-32's kernel driver and display module became primary display for Raspberry Pi, HDMI monitor is blank and desktop is displayed on 4DPi-32 display module. Things get weird after this point. Applicaitons I compiled for Qt pops up on HDMI display instead of 4DPi-32 display module. Gnome desktop's primary display is 4DPi-32 but for Qt applications primary display is HDMI output. I asked help from 4D systems, but unfortunately they couldn't help. Their "support team" asked me to look for the answer in Qt and Raspberry Pi forum :)

    Following are additional information about my platform, warning and configuration messages. Please help, Thank you.

    This is a warning message I get when I ran Qt Application
    "This plugin does not support propagateSizeHints()"

    These are supported platforms when I run Qt application in Raspberry Pi
    eglfs
    linuxfb
    minimal
    minimalegl

    ** This is my Qt configuration:
    **Building on: linux-g++-64
    Building for: devices/linux-rasp-pi-g++
    Architecture: arm, features:
    Host architecture: unknown, features:
    Platform notes:

            - Also available for Linux: linux-kcc linux-icc linux-cxx
    

    qmake vars .......... styles += mac fusion windows DEFINES += QT_NO_LIBUDEV DEFINES += QT_NO_XCB PRECOMPILED_DIR = .pch/release-shared OBJECTS_DIR = .obj/release-shared MOC_DIR = .moc/release-shared RCC_DIR = .rcc/release-shared UI_DIR = .uic/release-shared sql-drivers = sql-plugins = sqlite qmake switches .........
    Build .................. libs tools
    Configuration .......... cross_compile qpa largefile neon pcre minimal-config small-config medium-config large-config full-config evdev linuxfb c++11 accessibility egl eglfs openvg opengl opengles2 shared qpa reduce_exports reduce_relocations clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname getifaddrs inotify system-png png freetype system-zlib nis iconv rpath concurrent audio-backend v8 release
    Debug .................. no
    C++11 support .......... yes
    pkg-config ............. yes
    Qt D-Bus module ........ no
    Qt Concurrent code ..... yes
    Qt GUI module .......... yes
    Qt Widgets module ...... yes
    JavaScriptCore JIT ..... To be decided by JavaScriptCore
    QML debugging .......... yes
    PCH support ............ no
    iWMMXt support ......... no
    NEON support ........... yes
    IPv6 ifname support .... yes
    getaddrinfo support .... yes
    getifaddrs support ..... yes
    Accessibility .......... yes
    NIS support ............ yes
    CUPS support ........... no
    Iconv support .......... yes
    Glib support ........... no
    GStreamer support ...... no
    PulseAudio support ..... no
    Large File support ..... yes
    GIF support ............ plugin
    JPEG support ........... plugin (qt)
    PNG support ............ yes (system)
    zlib support ........... system
    Session management ..... auto
    libudev support ........ no
    Use system proxies ..... no
    OpenGL support ......... yes (OpenGL ES 2.x)
    OpenVG support ......... yes
    XShape support ......... auto
    XVideo support ......... auto
    XSync support .......... auto
    Xinerama support ....... runtime
    Xcursor support ........ runtime
    Xfixes support ......... runtime
    Xrandr support ......... runtime
    Xi support ............. runtime
    Xi2 support ............ auto
    MIT-SHM support ........ auto
    FontConfig support ..... no
    XKB Support ............ auto
    GTK theme support ...... no
    SQLite support ......... plugin (qt)
    OpenSSL support ........ no
    Alsa support ........... no
    libICU support ......... no
    PCRE support ........... qt
    Xcb support ............ no
    Xrender support ........ no
    EGLFS support .......... yes
    DirectFB support ....... no
    LinuxFB support ........ yes
    KMS support ............ no



  • Hello,

    I solved the problem.
    Qt that I cross-compiled for raspberry pi was lack of xcb platform support. If xcb is not added into Qt configuration before cross-compiling it, Qt applications cannot communicate with X11 of Linux. And problem occurs here. It seems like kernel driver for 4DPi-32 is designed for X11, so desktop is running well on 4DPi-32 display. Qt needs to be cross-compiled with xcb support so Qt applications can run on 4DPi-32 on X11 desktop environment. If xcb doesnt exist Qt applicaiton runs with other supported platforms which goes through HDMI output. These platforms are "eglfs, linuxfb, minimal, minimalegl".

    To activate xcb in Qt, -qt-xcb configuraiton option must be added to configure command of Qt cross-compile process.

    Thats all, hope this piece of information will be helpful to other people who have similar problem.



  • Hi! Could you tell how to add this option to configure?
    My config is:

    ./configure -release -opengl es2 -device linux-rasp-pi2-g++ -device-option CROSS_COMPILE=/home/pawel/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix /home/pawel/raspi/qt5pi -hostprefix /home/pawel/raspi/qt5 -v
    
    

    I am using LCD 3.5 via SPI and I cant see Qt apps on it but on HDMI.
    Thanks



  • Hello Paavo,
    We you able to display QT app on 3.5 inch screen?? if yes, what was the solution??

    Even for me I am facing the same problem, QT always comes up on HDMI.

    Please suggest.

    Regards,
    Sanju


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.