You are not logged in.

#1 2022-06-08 12:58:05

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 192
Website

[SOLVED] Cannot force dark theme in qt applications.

I know virtualbox is a qt applications.
I want to enable dark mode in virtualbox
So I installed the qt5ct application and in my .bashrc I added the following lines -

 
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
neofetch

export NNN_BMS='d:~/Desktop;p:~/Pictures;D:~/Downloads/'
export NNN_SSHFS="sshfs -o follow_symlinks"        # make sshfs follow symlinks on the remote
export NNN_COLORS="2136"                           # use a different color for each context
export NNN_TRASH=1                                 # trash (needs trash-cli) instead of delete

export EDITOR=vim
export QT_QPA_PLATFORMTHEME=qt5ct

Then when I open the application qt5ct it gives me a error on the upper corner -


The applications is not configured correctly-
The QT_QPA_PLATFORMTHEME environment variable is not set (required value: qt5ct).

I tried to use kvantum but it is very complicated and going out of my mind.....

Can anyone help me with this ?

Last edited by RounakDutta (2022-06-09 17:23:51)

Offline

#2 2022-06-08 13:17:41

Maniaxx
Member
Registered: 2014-05-14
Posts: 761

Re: [SOLVED] Cannot force dark theme in qt applications.

.bashrc is limited to shell scope. /etc/profile.d/*.sh is a nice place.
https://wiki.archlinux.org/title/Enviro … s#Globally

Last edited by Maniaxx (2022-06-08 13:20:31)


sys2064

Offline

#3 2022-06-09 17:19:04

RounakDutta
Member
From: West Bengal, India
Registered: 2022-02-11
Posts: 192
Website

Re: [SOLVED] Cannot force dark theme in qt applications.

THANK YOU SO MUCH!!. Instead of setting the variable globally I was setting it for per user. I am so dumb. It works now after I set it to -

[rounak@archissexy ~]$ ls /etc/profile.d
freetype2.sh  libreoffice-still.csh  perlbin.csh  vte.sh
gawk.csh      libreoffice-still.sh   perlbin.sh
gawk.sh       locale.sh              qt5ct.sh
gpm.sh        PackageKit.sh          vte.csh
[rounak@archissexy ~]$ cd /etc/profile.d
[rounak@archissexy profile.d]$ cat qt5ct.sh
export QT_QPA_PLATFORMTHEME=qt5ct
[rounak@archissexy profile.d]$

The application ("qt5ct5") works !!!!

Last edited by RounakDutta (2022-06-09 17:19:38)

Offline

#4 2022-06-09 17:35:00

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Cannot force dark theme in qt applications.

RounakDutta wrote:

THANK YOU SO MUCH!!. Instead of setting the variable globally I was setting it for per user.

Not quite. You were setting it 'per user but only for applications launched from the terminal'.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB