Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QT raspberry cross compile debug environment



  • Hi,

    I develop a Qt application on rapsberry using cross compile.
    In debug mode I would set QT_QPA_EGLFS_HIDECURSOR=1 or
    export QT_LOGGING_RULES=qt.qpa.*=true

    When I export variable on raspberry and run application on raspberry directly, the environments variable are working.
    When I execute application in debug mode using crosscompile, the environments variable a not working.
    Where should I place
    export QT_LOGGING_RULES=qt.qpa.*=true
    in debug cross compile mode ?

    Sebastien



  • @chtioub
    That is strange. If you put the exports in e.g. /etc/profile or ~/.bashrc, then these variables should stay defined.

    Have you by accident changed the Base environment for this run configuration setting for your project from System Environment to Clean Environment?

    0_1551810219833_06b323b6-c80b-470f-b024-9a5d6086a929-image.png

    You can press the Fetch Device Environment button and verify your definitions are there.



  • Hi,

    when I fetch device environment and type export command in my raspberry terminal, I do not have the same things

    0_1551821639564_df03e749-82ab-4dea-8c83-a5f9ce483687-image.png

    I add
    export QT_QPA_GENERIC_PLUGINS=evdevtouch:/dev/input/event4:rotate=90

    and I do not see it in qt



  • In fact, the environment variables I see in Qt are the same as I connect to the raspberry using

    ssh pi@192.168.1.99
    export
    


  • @chtioub
    If you use ssh, you might get a different environment indeed. In that case, it matters in which profile you define your exports.

    Have a look at e.g.:
    https://stackoverflow.com/questions/216202/why-does-an-ssh-remote-command-get-fewer-environment-variables-then-when-run-man

    A neat suggestion therein is to define some custom variable in each of the potential profile files with the name of the variable in each file describing the profile's filename. Then look for which of those variables gets defined in your environment under various circumstances (directly at the Pi prompt, via SSH, etc...). Then put the the variables you need in the corresponding file.


Log in to reply