As I understand it Lazarus Apps use Lazarus default colours unless the user has somehow set something else. Doing so makes the app really flexible, especially for people who like dark themes, they can get a great result. A Qt app does not pickup system colours by default (sadly).
But if the user does "set something", see below, Qt LCL follows the set theme really well but some other, external, components do not. It would be easy to work around that or fix the component if we could just read what the colors in the chosen theme really are. I assume there is some qt library that reads the (eg) qt5ct theme and Qt widgets get their colours from there.
Does anyone know how to read colours from the selected theme ?
More details ?Starting a Qt app with either an env var set or a switch will instruct it what colour theme to use -
$> QT_QPA_PLATFORMTHEME=qt5ct ./my_qt5_app <enter>
$> ./my_qt5_app -platformtheme gtk2 <enter>
If you use qt5ct then it makes sense to set that var in either /etc/environment (requires root or, simpler in a .xsessionrc file in your home dir). Or use the switch for a one off test. In either case the value can be, eg qt5ct (if installed and configed) or gtk2.
qt5ct is really good but does require an extra package and a bit of configuring. Just setting gtk2 might be enough for most people
but it does not always work. I just noticed that it does not work on Debian Bookwork at the moment. Sigh....
So, installing qt5ct seems safer ! It adds about 180k to your install. Make it a "recommended" attribute of a deb and it will be installed along with the other Qt libraries. .
Davo
EDIT : added warning about value=gtk2 not always working.