site  contact  subhomenews

Qt5 and Scribus in next Easy Pyro

May 22, 2018 — BarryK

I received an email from John, suggesting that one gap in the app collection in Easy Pyro is a good desktop publisher. Actually, LibreOffice does a pretty good job at that, however, a specialised desktop publishing app would be nice.

Years ago, in one of the pup series, I decided to use Qt4 apps rather than progress from gtk2 to gtk3. In reflective moments, I still find myself asking what is the point of gtk3, when gtk2-based apps have no discernible disadvantage ...anyway, that is a grumble for another time.

One very important reason why I like the progression from Qt4 from gtk2, is that Qt4 can use the current gtk2 theme. This makes theming very simple. It was simply a matter of a few lines in ~/.config/Trolltech.conf:
[Qt]
font="DejaVu Sans,10,-1,5,50,0,0,0,0,0"
style=GTK+
Unfortunately, that does not work for Qt5. I think that I read, that ability was taken out at 5.7. I read about it, and the solution, in the Arch Wiki:

https://wiki.archlinux.org/index.php/Uniform_look_for_Qt_and_GTK_applications

It is required to install 'qtstyleplugins', from here:

http://code.qt.io/cgit/qt/qtstyleplugins.git

Grab it:
git clone git://code.qt.io/qt/qtstyleplugins.git --depth 1
Compile:
# mv qtstyleplugins qtstyleplugins-20170311
# cd qtstyleplugins-20170311
# qmake PREFIX='/usr' LIBDIR='/usr/lib'
# make
# new2dir make install
# make install
...the second-last line above, is broken, need to run the last line to install all files.

Then:
export QT_QPA_PLATFORMTHEME=gtk2
I then ran scribus, the theme looks correct, however menu font is too small, so I also did this:
export QT_SCALE_FACTOR=1.2
Note, I managed to create a much smaller subset of the full Qt5 package for running scribus and smplayer, that I named 'qt5-basic'.

I plan to include scribus in the next release of Easy Pyro, that should be 0.9.3.

Tags: easy