cool-retro-term icon indicating copy to clipboard operation
cool-retro-term copied to clipboard

CRT clears the QT_QPA_PLATFORMTHEME environment variable for child processes

Open Botspot opened this issue 1 year ago • 2 comments

I tried running some QT5 apps from CRT and noticed that they were not using their usual dark mode. It turns out that CRT has cleared this variable. Why is that, and can it be fixed?

I found this by comparing the differences from running env in Cool Retro Term versus LXTerminal. Normally, QT_QPA_PLATFORMTHEME=qt5ct.

OS information: Raspberry Pi OS Bookworm 64-bit, CRT was installed using Pi-Apps.

Botspot avatar Aug 02 '24 05:08 Botspot

It seems that the variable is cleared deliberately. https://github.com/Swordfish90/cool-retro-term/blob/f157648d1e51878a10e02a8836c1e15aa8c59cc9/app/main.cpp#L36

As an easy fix, could the variable's original value be captured, and then passed to child processes that are launched by the shell?

Botspot avatar Aug 02 '24 05:08 Botspot

I solved this by installing kvantum styles and add the environment variable in my ~/.profile (in my case ~/.zprofile ) export QT_STYLE_OVERRIDE=kvantum

ldenevi avatar Nov 23 '24 12:11 ldenevi