Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

QGtkStyle could not resolve GTK

I have a series of apps installed in Ubuntu 18.04 using Anaconda. They run just fine, but the menus appear as blank.gtk apps not displaying the menus

Some of these apps are:

  • Spyder
  • Orange 3
  • qtconsole

For all of them I obtain the same error when I execute them:

QGtkStyle could not resolve GTK. Make sure you have installed the proper libraries.

I have been trying to sort it for hours without success.

Any idea of how to fix this?

like image 696
Jumy Elerossë Avatar asked May 27 '18 19:05

Jumy Elerossë


3 Answers

As a quick fix, add

export QT_STYLE_OVERRIDE=gtk2

to your .bashrc. Then your menus should at least have some text again.

like image 68
user9864150 Avatar answered Nov 14 '22 03:11

user9864150


This is not strictly speaking a GTK theming problem. Instead, this is because your Qt version is old. You need install qt=5.9.
In my case, that problem was caused because I use conda-forge channel and qt is in 5.6 version there. When explicitly install qt=5.9 from default channel the problem was solved without change .bashrc file.

like image 25
cosmoscalibur Avatar answered Nov 14 '22 05:11

cosmoscalibur


I soleved it by upgrading and installing pkg-config

sudo apt upgrade && sudo apt install pkg-config 

AND Jupyter series just works well!

like image 1
Bathe Avatar answered Nov 14 '22 05:11

Bathe