Bug 473401

Summary: kdialog and dark theme
Product: [Applications] kdialog Reporter: Roberto <r087r70>
Component: generalAssignee: Brad Hards <bradh>
Status: REPORTED ---    
Severity: normal CC: r087r70
Priority: NOR    
Version First Reported In: 22.12.3   
Target Milestone: ---   
Platform: Debian unstable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Roberto 2023-08-15 08:47:03 UTC
I  have some script enabled in cron (as my user, not root) which run kdialog to notice me in case of errors. However the dialog occurs to use light theme even if I'm using Breeze-dark in plasma.

Also, I cannot use the `--platformtheme` option in kdialog:

$ kdialog --platformtheme breeze-dark --msgbox "HELLO"
kdialog: Unknown option 'platformtheme'.

How should I set dark theme in scripts running in cron?

STEPS TO REPRODUCE
1.  set a user script in crontab, which calls kdialog
2. wait that the script runs

OBSERVED RESULT
the window message is using standard (light) theme

EXPECTED RESULT
the window message should be using the user's theme

SOFTWARE/OS VERSIONS
Linux:  debian/sid
KDE Plasma Version: 5.27.7.1
KDE Frameworks Version: 5.107.0
Qt Version: 5.15.10