Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. International
  3. German
  4. Qt Widget läuft nicht auf einem RPI3 mit LCD-Display
Forum Updated to NodeBB v4.3 + New Features

Qt Widget läuft nicht auf einem RPI3 mit LCD-Display

Scheduled Pinned Locked Moved Unsolved German
2 Posts 1 Posters 608 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K-StrK Offline
    K-StrK Offline
    K-Str
    wrote on last edited by K-Str
    #1

    Re: Grafische Anwendung auf raspberry mit LCD-Display

    Hallo,
    ioch habe schon vor einiger Zeit dieses Thema gepostet.
    Da habe ich von @sneubert eine gute Lösung bekommen. Danke nochmal dafür an @sneubert !
    Jetzt ist das Thema bei mir nochmal hochgekommen, denn ich arbeite mit einem neuen LCD-Display, das aber die gleiche schnittstelle hat:
    QUIMAT 3.5" HDMI Display-B.
    Nachdem ich den Qt-Creator für cross-compiling erneut aufgesetzt habe bekomme ich ein ähnliches Problem.
    Momentan verwende ich einen Raspi3 mit Buster
    Qt 5.12.5 läuft auf einen Ubuntu 18.04.3 Host.
    Ich kann zwar das Widget vom Qt-Creator erstellen und es wird auch auf dem LCD-Display angezeigt, aber das Programm erkennt die Eingabe mit dem Pen des Touch-Screen nicht.
    Wenn ich den Qt-Creator (mit Qt 5.11.3 auf dem Raspberry direkt installieren und das Widget erstelle, dann funktioniert das problemlos.
    Vielen Dank für Eure Hilfe!

    1 Reply Last reply
    0
    • K-StrK Offline
      K-StrK Offline
      K-Str
      wrote on last edited by K-Str
      #2

      Hallo,
      hier noch die Fehlermeldungen die ich beim Starten eines Widgets bekomme sowie die Kommandos für das Einrichten des Raspberry und Linux Hostes::

      • Zunächst kommt mal diese Warnung:
        qglobal.h:45:12: error: 'type_traits' file not found
        mainwindow.cpp:1:1: note: in file included from /home/kurt/Widget/mainwindow.cpp:1:

      Beim Starten des Widgets bekomme ich diesen Fehler:

      • Unable to query physical screen size, defaulting to 100 dpi.
      • To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
      • Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.

      Was heist das in der letzten Zeile? Muß ich da was konfigurieren in dem Module "main.cpp"?
      Und nun wird zwar das Widget angezeigt aber die Eingabe über den Touch-Screen wird nicht erkannt.

      Hier der update auf dem Raspberry:

      echo -e ${Green}"first make rpi-update"${Reset}
      sudo rpi-update
      sudo reboot
      
      sudo apt-get update
      sudo apt-get build-dep qt4-x11
      sudo apt-get build-dep libqt5gui5
      sudo apt-get inst~all libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0
      sudo apt-get install ttf-dejavu gdbserver 
      echo -e ${Green}"Prepare target folder"${Reset}
      sudo mkdir /usr/local/qt5pi
      sudo chown pi:pi /usr/local/qt5pi
      

      und auf dem Linux Host:

      ssh-keygen -t rsa -C pi@192.168.180.42 -N "" -f ~/.ssh/id_rsa
      cat ~/.ssh/id_rsa.pub | ssh -o StrictHostKeyChecking=no pi@192.168.180.42 "mkdir -p .ssh && chmod 700 .ssh && cat >> .ssh/authorized_keys"
      
      echo -e ${Green}"Install packages"${Reset}
      sudo apt-get install git python build-essential --yes
      
      echo -e ${Green}"Create working folder and set a toolchain"${Reset}
      mkdir ~/raspi
      cd ~/raspi
      git clone https://github.com/raspberrypi/tools
      
      
      echo -e ${Green}"Create and configure a sysroot"${Reset}
      mkdir sysroot sysroot/usr sysroot/opt
      
      rsync -avz pi@192.168.180.42:/lib sysroot
      rsync -avz pi@192.168.180.42:/usr/include sysroot/usr
      rsync -avz pi@192.168.180.42:/usr/lib sysroot/usr
      rsync -avz pi@192.168.180.42:/opt/vc sysroot/opt
      
      echo -e ${Green}"adjust our symbolic links in sysroot to be relative"${Reset}
      wget https://raw.githubusercontent.com/riscv/riscv-poky/master/scripts/sysroot-relativelinks.py
      chmod +x sysroot-relativelinks.py
      ./sysroot-relativelinks.py sysroot
      
      echo -e ${Green}"Download Qt"${Reset}
      wget http://download.qt.io/official_releases/qt/5.12/5.12.5/single/qt-everywhere-src-5.12.5.tar.xz
      tar xvf  qt-everywhere-src-5.12.5.tar.xz
      cd  qt-everywhere-src-5.12.5
      
      echo -e ${Green}"Configure Qt for cross compilation"${Reset}
      ./configure -release -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -skip qtwayland -skip qtlocation -skip qtscript -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm
      
      echo -e ${Green}"run 'make -j4'"${Reset}
      make -j4
      
      echo -e ${Green}"run 'make install'"${Reset}
      make install
      echo -e ${Green}"eploye to your Raspberry Pi using the rsync command"${Reset}
      cd ~/raspi
      rsync -avz qt5pi pi@192.168.180.42:/usr/local
      

      Vielleicht hilft das bei der Analyse des Problems.
      Vielen Dank!

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved