Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Make Qt5 Based Applications Follow the Ambiance Theme in Ubuntu 18.04
#1
Rainbow 
Does it bug you that Qt applications look different in Ubuntu 18.04? It bugs me too so I went off searching for how to get them to follow the default Ambiance theme, at least. Here’s a quick and dirty way. This doesn’t work with every theme and/or application but it does with VirtualBox and the default Ambiance theme. 

1 . Install these packages:

Code:
sudo apt install qt5-style-plugins

2. Now we have to tell the system to use the GTK theme for Qt. We need to edit the /etc/environment file to make the change work for all users on the system:

Code:
sudo nano /etc/environment

Add  this line to the bottom of the file:

Code:
QT_QPA_PLATFORMTHEME=gtk2

Save your changes by pressing Ctrl+O then Enter. Exit the nano editor with Ctrl+X.

3. Reboot the system to make this take effect. 

Once you're up and running and logged in again, open up ViryualBox and be amazed at the feeling of continuity having it appear with the same desktop theme can bring to your life. Smile
-- Your Fearless Leader!

Reply
#2
Thumbs Up 
Thank you, thank you, thank you!  I've always been annoyed that Virtualbox hasn't themed properly since version 5.0 and now it does!
Reply
#3
This doesn't work for me on 18.04 and the newest virtualbox. Has something changed somewhere?
Reply
#4
(09-14-2018, 04:44 PM)MdKnightR Wrote: Thank you, thank you, thank you!  I've always been annoyed that Virtualbox hasn't themed properly since version 5.0 and now it does!

2. Now we have to tell the system to use the GTK theme for Qt. We need to edit the /etc/environment file to make the change work for all users on the system:
Reply
#5
(06-27-2019, 11:11 PM)henrysay Wrote:
(09-14-2018, 04:44 PM)MdKnightR Wrote: Thank you, thank you, thank you!  I've always been annoyed that Virtualbox hasn't themed properly since version 5.0 and now it does!

2. Now we have to tell the system to use the GTK theme for Qt. We need to edit the /etc/environment file to make the change work for all users on the system:

This account must be some automated spam account.
Every single thing it posts is a random sentence
or paragraph copied from an earlier post in the
same thread, pretending it is responding to other
people. Sometimes there are even links included
into either the "response" or the quote.
My website - My git repos

"Things are only impossible until they’re not." - Captain Jean-Luc Picard
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)