How to set plasma theme correctly along with i3?

I have been using Plasma for years and I love it, but this year I wanted to try something new, so I have been using i3wm during this year.

One issue that is still to polish is qt theming working correctly on both worlds.

To set a Qt configuration in i3, I created this script, but it seems not to correctly work on Plasma (on ~/.profile):

#!/bin/bash
CURRENT_DESKTOP=$(echo "$XDG_CURRENT_DESKTOP")

if [[ "$CURRENT_DESKTOP" = "i3" ]]; then
    export QT_QPA_PLATFORMTHEME="qt5ct"
    export QT_SCREEN_SCALE_FACTORS=1.5 # 1.5
    export QT_AUTO_SCREEN_SCALE_FACTOR=0
elif [[ "$CURRENT_DESKTOP" = "KDE" ]]; then
    unset QT_QPA_PLATFORMTHEME
    export QT_AUTO_SCREEN_SCALE_FACTOR=1
else
    echo "Current desktop is neither i3 or kwin: $CURRENT_DESKTOP"
fi

echo $CURRENT_DESKTOP
echo $QT_QPA_PLATFORMTHEME
echo $QT_AUTO_SCREEN_SCALE_FACTOR 

I’m using Arch with Plasma 6.1.4 with breeze-dark decorations

Are you missing qqc2-desktop-style: Arch Linux - qqc2-desktop-style 6.4.0-1 (x86_64)

Hi! Thanks for replying! No, I have both qqc2-desktop-style and qqc2-desktop-style5 installed.

Hm, you need to somehow tell Qt to use that.

There’s basically two style items, one is for Qt Widgets (older apps) and one is for Qt Quick (newer apps, like system settings).

Edit: It might be QT_QUICK_CONTROLS_STYLE=qqc2-desktop-style

I’ve been able to turn the white into black by changing in qt6tc the standard dialog from default into KDE, but Plasma still loads this configuration when plasma is running (ideally qt6tc should read Plasma configuration, not the opposite). I also removed these AUR packages just in case there were some intromission:

khotkeys khtml kjs kmonad-bin kmonad-bin-debug kpeoplevcard krunner5 krunner5-debug kwin-bismuth kwin-effect-rounded-corners-git kwin-effect-rounded-corners-git-debug kwin-polonium

I couldn’t remove kquickcharts because it would break some dependencies.

I tried exporting QT_QUICK_CONTROLS_STYLE=qqc2-desktop-style on /etc/environment and it just prevented Plasma to read its configuration, so it just showed me a blank desktop. I also tried exporting it from .profile but didn’t seem to do anything.

It’s a bit better now since I can read the options haha but it’s still far from what it was: the accent is not recognized, the theme for the available space bar is different too… and the theme is not consistent depending on what gets pressed: