You are not logged in.

#1 2017-08-05 17:33:44

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,897

QT theming

How can QT applications easily pick up the theme in use and what packages and configuration is needed to get themes to work with QT apps  in Openbox environment?


Real Men Use Linux

Offline

#2 2017-08-05 19:16:55

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: QT theming

We use this line (in ~/.xsessionrc, use ~/.profile for console logins):

export QT_STYLE_OVERRIDE=GTK+

https://github.com/BunsenLabs/bunsen-co … ssionrc#L9

This causes Qt applications to attempt to match to the GTK theme in use but only works for Hydrogen/Deuterium/jessie.

For Helium/stretch, see https://wiki.archlinux.org/index.php/Qt … KDE_Plasma

Offline

#3 2017-08-05 20:24:49

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,897

Re: QT theming

the qt5ct package is not in Debian I can see.


Real Men Use Linux

Offline

#4 2017-08-05 20:35:34

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: QT theming

^ The application requires Qt's private headers so Debian will not package it, apparently.

https://bugs.debian.org/cgi-bin/bugrepo … =822246#25

Unofficial version here:

https://github.com/mati75/qt5ct

I ♥ startpage.com...

Offline

#5 2017-08-05 20:55:38

DeepDayze
Like sands through an hourglass...
From: In Linux Land
Registered: 2017-05-28
Posts: 1,897

Re: QT theming

Head_on_a_Stick wrote:

^ The application requires Qt's private headers so Debian will not package it, apparently.

https://bugs.debian.org/cgi-bin/bugrepo … =822246#25

Unofficial version here:

https://github.com/mati75/qt5ct

I ♥ startpage.com...


Ahh now I understand so I would have to compile this myself.


Real Men Use Linux

Offline

#6 2017-08-05 21:01:10

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Offline

#7 2017-08-06 04:43:34

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: QT theming

Could it be that the Debian package qt5-gtk-platformtheme would help?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#8 2017-08-06 19:31:14

Head_on_a_Stick
Member
From: London
Registered: 2015-09-29
Posts: 9,068
Website

Re: QT theming

johnraff wrote:

Good find, yes, that looks very useful — mark for inclusion with Helium?

I will test it once I get my BL laptop working again...

Offline

#9 2017-08-07 03:06:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: QT theming

Head_on_a_Stick wrote:
johnraff wrote:

Good find, yes, that looks very useful — mark for inclusion with Helium?
I will test it once I get my BL laptop working again...

Yes, let's wait until someone has actually used it and found it useful! I just did a quick debian repo search for qt5* smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#10 2017-08-07 16:36:05

Naik
Member
From: the edge of insanity
Registered: 2015-10-03
Posts: 328

Re: QT theming

johnraff wrote:

I got it running on my BunSidLabs install just some days ago and found it made much improvement to the optical integration of qt-applications. So i would vote for it.

Package: qt5-gtk-platformtheme
Source: qtbase-opensource-src
Version: 5.7.1+dfsg-4
Installed-Size: 452
Maintainer: Debian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Architecture: amd64

naik --greetz


"Kaum macht [Mensch]* es richtig, funktioniert es sofort!"
BL-Kitchen Codeberg

Offline

#11 2017-08-07 17:02:06

damo
....moderator....
Registered: 2015-08-20
Posts: 6,734

Re: QT theming

I'm going to need to test this out: Openshot from the stretch repos is crashing all the time, but Openshot-QT seems much more stable (and has a nice shiny-black theme hmm )


Be Excellent to Each Other...
The Bunsenlabs Lithium Desktop » Here
FORUM RULES and posting guidelines «» Help page for forum post formatting
Artwork on DeviantArt  «» BunsenLabs on DeviantArt

Offline

#12 2017-08-29 09:01:00

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: QT theming

Has anyone tried qt5-gtk-platformtheme?

Any suggestions for good test qt5 apps available in stretch, that could be used for a before-and-after comparison?
ie apps where the GUI improvement brought by installing qt5-gtk-platformtheme ought to be obvious?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#13 2017-08-29 13:13:32

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: QT theming

johnraff wrote:

Has anyone tried qt5-gtk-platformtheme?

Any suggestions for good test qt5 apps available in stretch, that could be used for a before-and-after comparison?
ie apps where the GUI improvement brought by installing qt5-gtk-platformtheme ought to be obvious?

Ive been trying out notepadqq in my debian stretch install. Not available in stretch though, had to compile from source. Id be interested to know this also. I know qupzilla the web browser uses qt5 so maybe there are some differences with that from previous. I notice qt5-gtk-platformtheme is already installed in my system.

http://notepadqq.altervista.org/wp/

Offline

#14 2017-08-30 05:39:26

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: QT theming

qupzilla had a lot of qt5 dependencies, so it looked like a good test.
In a stretch VM, I couldn't detect any difference in appearance before and after installing qt5-gtk-platformtheme.
It was using the built-in "Linux Default" theme - bland enough, but different from BL "Beam", which Firefox, for example, was more-or-less following. Qupzilla's icons, too, were taken from the same default set that root uses, not my configured Papirus.
hPgL54bt.png
Maybe some further configuration is needed to use qt5-gtk-platformtheme?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#15 2017-08-30 17:56:55

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: QT theming

The Kvantum Qt theme engine and manager comes with a lot of themes, so maybe you could  use that to match up with the GTK theme...ones like the Arc theme, for example.

https://store.kde.org/content/show.php/ … ent=166241

And of course, you know I'm only writing this because I have it in a repository  wink

https://build.opensuse.org/package/show … le-kvantum

It's a single deb package, so it's easier to just download the deb and install it with gdebi or in Stretch, apt also works like gdebi to install debs and pull in missing dependencies.  The Kvantum manager shows up in Settings.  Note that since Qt5 theming doesn't work with versions less than Qt5.4, the packages for distros with older Qt5s are Qt4 only.  Stretch and newer Ubuntu packages work for both Qt4 and 5.  The debian/rules and control file contain some code that automatically determine what distro and Qt5 version is in the build platform, and adjust the build automatically--that way one set of source files "fits all". (I saw how the Jessie backports for openjdk-8 did some similar kind of adjusting, adapted that for the Pale Moon Stretch to build against gcc-4.9 per the PM developers mandate, and then adapted it for Kvantum.)

Anyway, I also tried yesterday building notepadqq from some PPA source, but the build procedure errors out when built using Stretch's debhelper 10; even debhelper 10 in Jessie from jessie-backports.

https://build.opensuse.org/package/show … /notepadqq

Something about no permission to install stuff in the directories, such as /usr/share/icons.  So far I'm stumped on how to fix that elegantly, though a kludge could be to forwardport debhelper 9 to Stretch in my repo, and insist that it be built against that.  If anyone has advice on how to fix the debhelper 10 build, I'm listening! You can get to the repo, which contains the sources and debs, by clicking the distro links on the right, then clicking the "go to download repository" link on the next page.

Anyway, I would bet that the Jessie packages (it's a multi-deb package) would run just
fine in Stretch in the meantime.

Last edited by stevep (2017-08-30 18:18:45)

Offline

#16 2017-08-31 00:58:01

Steve
Member
Registered: 2017-01-03
Posts: 642

Re: QT theming

^ steve, i followed the github instructions to build notepadqq on debian 9 if that helps. Doesnt follow the gtk theme though, it uses the default adwaita theme, roots theme? I will have to have a look at that Kvantum program, looks interesting, cheers.

Also notpadqq comes with a heap of different colour schemes, like over 20 or more.

https://github.com/notepadqq/notepadqq

Offline

#17 2017-08-31 01:26:55

stevep
MX Linux Developer
Registered: 2016-08-08
Posts: 381

Re: QT theming

Steve wrote:

^ steve, i followed the github instructions to build notepadqq on debian 9 if that helps. Doesnt follow the gtk theme though, it uses the default adwaita theme, roots theme? I will have to have a look at that Kvantum program, looks interesting, cheers.

Also notpadqq comes with a heap of different colour schemes, like over 20 or more.

https://github.com/notepadqq/notepadqq

I tested the jessie packages of notepadqq in Stretch, and they had no trouble installing.  There's also a notepadqq-gtk package that gets generated that's supposed to make it follow the GTK theme, but I haven't tested it. Let me look at it, maybe it just starts it with the command to follow the theme.  Yeah, it's just a script

/usr/lib/notepadqq/notepadqq.sh -style=gtk "$@"

and notepadqq.sh is... a lot of stuff, mostly concerning manually installed versions of Qt 5.  Maybe the Arch Wiki can shed some light on the situation:  https://wiki.archlinux.org/index.php/Un … plications

No doubt the debhelper 10 problem is due to something like an issue with the syntax of the commands in the debian/rules or the install files; it's a lot more fancy than just make and "make install", but a lot of it is right at the upper levels of my limited understanding.

Offline

#18 2017-08-31 07:41:12

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: QT theming

The idea for BL at this point would have been to provide some way for QT5 apps to follow whatever GTK theme the user had chosen, the same way QT4 would do if QT_STYLE_OVERRIDE=GTK+ was set.

Installing a QT theme engine and choosing something to match our current default theme sounds like a less attractive option.

Unfortunately qt5ct is not available in Debian atm, and it seems to overrule Plasma settings too, although the issue here is getting the occasional QT5 app to fit in on a basically GTK desktop, so Plasma shouldn't be around.

Something appears to have changed with QT5.7 (stretch) which might have been fixed in 5.8, but too late for Helium. I doubt if anyone is going to backport the whole  QT5 collection from Buster!

It looks very messy:
https://bugs.launchpad.net/ubuntu/+sour … ug/1695618
https://wiki.archlinux.org/index.php/qt … KDE_Plasma
https://wiki.archlinux.org/index.php/Un … in_Qt_apps
https://lists.debian.org/debian-qt-kde/ … 00219.html
https://github.com/manjaro/release-plan/issues/73
https://bbs.archlinux.org/viewtopic.php?id=214147

But I have made a little progress with qupzilla. smile
1) Install qt5-style-plugins
2) Put 'export QT_QPA_PLATFORMTHEME=gtk2' in eg ~/.xsessionrc
and qupzilla now shows the current GTK theme colours and widgets.
It still doesn't use the set icon theme though. neutral

EDIT screenshot:
sO0QFhmt.png

( I guess for GTK3 theming to work, we'd have to use a custom package of qt5ct , and reset QT_QPA_PLATFORMTHEME=qt5ct )

EDIT2 apologies for some duplication of what was in previous posts that I hadn't read completely.

Last edited by johnraff (2017-09-02 06:31:57)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#19 2017-09-07 04:55:42

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: QT theming

Naik wrote:
johnraff wrote:

I got it running on my BunSidLabs install just some days ago and found it made much improvement to the optical integration of qt-applications.

johnraff wrote:

Has anyone tried qt5-gtk-platformtheme?

@Naik - apologies for overlooking your post. (How did I miss it? :8 )

Anyway, you used it on Sid, where QT5 has moved on to 5.9 or so. It looks as if there are problems with QT5.7 which is what we have on Debian Stretch.

What I think I've understood:
qt5-gtk-platformtheme is for GTK3 themes, but isn't supported on Stretch.
qt5-style-plugins is for GTK2 themes, but works on Stretch.

(more to follow)

Last edited by johnraff (2017-09-07 06:17:40)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#20 2017-09-07 08:53:10

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,558
Website

Re: QT theming

icons

To get all (er... most) icons to display in QT5 apps, install libqt5svg5.

qt5ct is available as an installable deb from the above linked ppa, but I found it not to be necessary if you just want QT5 apps to copy your GTK2 and icon themes.

Summary:
NB this is for Helium/Stretch.

Install:
qt5-style-plugins
libqt5svg5

Edit the "for qt5 apps" section of ~/.xsessionrc thus:

# for qt5 apps
#export QT_STYLE_OVERRIDE=GTK+
export QT_QPA_PLATFORMTHEME=gtk2

Logout/in, start up a QT5 app such as qupzilla or juffed.
Also open lxappearance (menu>preferences>appearance) and try switching the gtk theme or icon theme. The qt5 apps should follow without needing to be restarted. For some reason the faenza-bunsen icon themes aren't detected (inheritance problem?) but Paper, Papirus and others all seemed OK.

Last edited by johnraff (2017-09-07 09:24:35)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

Board footer

Powered by FluxBB