Closed thiagokokada closed 1 year ago
I can reproduce an issue with inconsistent looking themes, but qt6ct works with kvantum for me. I have some dark theming in qt5 and qt6, but the style is inconsistent.
In addition to your settings, I also have this in .config/qt6ct/qt6ct.conf
:
[Appearance]
style=kvantum
…
My .config/Kvantum/kvantum.config
:
[General]
theme=KvArcDark
Config, that I have that is related to theming:
environment.systemPackages = with pkgs; [
arc-kde-theme
libsForQt5.frameworkintegration
kde-gtk-config
kwayland-integration
qt5.qtwayland
libsForQt5.qtstyleplugin-kvantum
qt6.qtwayland
kvantumQt6
qt6ct
qtstyleplugin-kvantum-qt4
];
environment.variables = {
QT_STYLE_OVERRIDE = "kvantum";
QT_QPA_PLATFORMTHEME = lib.mkForce "qt6ct";
};
qt = {
enable = true;
platformTheme = "qt5ct";
};
If you set QT_QPA_PLATFORMTHEME
to qt6ct, Qt 5 apps will not be themed using either qt5ct or qt6ct. If you set it to qt5ct both Qt 5 and Qt 6 app should use qt5ct and qt6ct respectively.
You shouldn't need to add qt6ct to environment.systemPackages
either as that's already done by qt.platformTheme = "qt5ct"
Ok, so if I set:
# NixOS
qt = {
enable = true;
platformTheme = "qt5ct";
};
It works for both qt5ct
and qt6ct
, however:
# Home-Manager
qt = {
enable = true;
platformTheme = "qtct";
};
Only works in qt5ct
, even if it basically does the same (export QT_QPA_PLATFORMTHEME=qt5ct
). If you set both in NixOS and Home-Manager it also works.
So I assume the issue here is either that qt5ct
only works when added to environment.systemPackages
(but doesn't work with the Home-Manager equivalent, home.packages
) or is that the NixOS module is adding extra packages that are missing in the Home-Manager module.
So I assume the issue here is either that
qt5ct
only works when added toenvironment.systemPackages
(but doesn't work with the Home-Manager equivalent,home.packages
)...
This also explain why it also doesn't work with nix-shell -p qt6Packages.qtstyleplugin-kvantum qt6ct
, because the issue seems to be at user profile level.
I double checked the packages that the NixOS modules adds vs Home-Manager and it doesn't seem they're doing anything different (both add libsForQt5.qtstyleplugin-kvantum
and qt6Packages.qtstyleplugin-kvantum
when qt.platformTheme = "qt{,5}ct"
is set). So I assume it is something that environment.systemPackages
is doing that makes it work.
I am also curious why home.packages
works in qt5ct
and not in qt6ct
. Maybe whatever qt5ct
is doing could be backported to qt6ct
so this could be fixed for every use case.
It's very important that both Qt 5 and Qt 6 plugin paths are linked
Maybe this?
It's very important that both Qt 5 and Qt 6 plugin paths are linked
Interesting that the Qt modules in Home-Manager does neither of them, and qt5ct
still works.
But I will try this later.
Maybe this?
It's very important that both Qt 5 and Qt 6 plugin paths are linked
Just setting those 2 environment variables in my config did the trick. So I think this is actually an bug with Home-Manager module where we need to setup those 2 variables too.
Going to close this issue since I opened a PR in Home-Manager to fix this issue: https://github.com/nix-community/home-manager/pull/4579
I have this exact issue, with the only difference being that it happens even with both the NixOS and the HM module enabled, I have also tried enabling either one. My configuration has been working for a while, and I didn't change anything, meaning it broke because of updating nixpkgs. Any ideas?
This happened to me lately as well. Bisecting nixpkgs, I traced the issue back to qt6: 6.7.3 -> 6.8.0 · NixOS/nixpkgs@d4f7b84
@K900 any idea what's going on?
Fixed in staging-next, please don't necropost.
@diniamo @eljamm see #350514
I couldn't find that issue when I last looked.
Describe the bug
Setting
QT_QPA_PLATFORMTHEME=qt5ct
orQT_QPA_PLATFORMTHEME=qt6ct
andQT_STYLE_OVERRIDE=kvantum
is not working. This is what happens when I run theqt6ct
application via command-line:However doing the same and running
qt5ct
works as expected. I am assuming we are missing a wrap or something here.Steps To Reproduce
Steps to reproduce the behavior:
nix-shell -p qt6Packages.qtstyleplugin-kvantum qt6ct
export QT_QPA_PLATFORMTHEME=qt6ct
export QT_STYLE_OVERRIDE=kvantum
qt6ct
Expected behavior
qt6ct
should work correctly and you should seekvantum
styles in theStyle
dropdown.Screenshots
qt5ct
qt6ct
Ignore the
The application is not configured correctly
. This happens because of theQT_STYLE_OVERRIDE=kvantum
, and while this is not recommended byqt6ct
it is recommended bykvantum
.Additional context
I am using the qt module in Home-Manager, but in case of issues in the module I am happily to port any fixes to it.
Notify maintainers
kvantum maintainers: @romildo @Scrumplex
qt6ct maintainers: @Flakebi @Scrumplex
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.