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 ?


  • @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?


    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


    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@

  • @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.:

    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