简体   繁体   中英

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应用程序不显示菜单

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?

As a quick fix, add

export QT_STYLE_OVERRIDE=gtk2

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

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.

I soleved it by upgrading and installing pkg-config

sudo apt upgrade && sudo apt install pkg-config 

AND Jupyter series just works well!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM