{"id":32972,"date":"2020-11-17T16:35:22","date_gmt":"2020-11-17T16:35:22","guid":{"rendered":"http:\/\/ubuntuhandbook.org\/?p=32972"},"modified":"2024-04-24T16:01:18","modified_gmt":"2024-04-24T16:01:18","slug":"change-qt5-apps-theme-look-native-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2020\/11\/change-qt5-apps-theme-look-native-ubuntu-20-04\/","title":{"rendered":"Change Qt5 Apps Theme to Make Them Look Native in Ubuntu 20.04"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-10460\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/07\/qt-icon.png\" alt=\"\" width=\"245\" height=\"250\" \/><\/p>\n<p><b>Found that Qt5 based applications (e.g., VLC, qBittorrent, Virtualbox, Audacious, etc.) look ugly on Ubuntu Desktop? That&#8217;s because they don&#8217;t inherit the global GTK theme.<\/b><\/p>\n<p>You can apply a custom theme to Qt5 applications to make them look native on Ubuntu Gnome desktop. And Kvantum, an SVG-based theme engine, can do the job.<\/p>\n<p>First let&#8217;s see the change before and after applying the changes:<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/audacious-yaru.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32973\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/audacious-gtkstyle.png\" alt=\"\" width=\"600\" height=\"371\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/audacious-gtkstyle.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/audacious-gtkstyle-450x278.png 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/qbittorrent-yaru.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32975\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/qbittorrent-gtkstyle.png\" alt=\"\" width=\"600\" height=\"339\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/qbittorrent-gtkstyle.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/qbittorrent-gtkstyle-450x254.png 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>And here&#8217;s step by step guide shows how to to this in Ubuntu 18.04, Ubuntu 20.04, Ubuntu 20.10.<\/p>\n<p><b>1.<\/b> First open <code style=\"color: black; border: none;\">terminal<\/code> (Ctrl+Alt+T) and run command to add the PPA:<\/p>\n<pre style=\"border: none;\">sudo add-apt-repository ppa:papirus\/papirus<\/pre>\n<p><i>This step is <b>optional for Ubuntu 20.04<\/b> and higher, as the packages are already made into main repositories.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32977\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/papirus-ppa.png\" alt=\"\" width=\"600\" height=\"149\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/papirus-ppa.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/papirus-ppa-450x112.png 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>2.<\/b> Install the <code style=\"color: black; border: none;\">qt5-style-kvantum<\/code> package by running command:<\/p>\n<pre style=\"border: none;\">sudo apt install qt5-style-kvantum<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32978\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/apt-qt5-style-kvantum.png\" alt=\"\" width=\"600\" height=\"268\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/apt-qt5-style-kvantum.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/apt-qt5-style-kvantum-450x201.png 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>3.<\/b> Add rule to user&#8217;s profile, so the theme engine will handle Qt apps for single user.<\/p>\n<pre style=\"border: none;\">echo \"export QT_STYLE_OVERRIDE=kvantum\" &gt;&gt; ~\/.profile<\/pre>\n<p><i>For global, you can edit <code style=\"border: none; color: black;\">\/etc\/environment<\/code> file and add the line <code style=\"border: none; color: black;\">export QT_STYLE_OVERRIDE=kvantum<\/code> as new line in the end.<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32979\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/export-kvantum.png\" alt=\"\" width=\"600\" height=\"157\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/export-kvantum.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/export-kvantum-450x118.png 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>\n<p><b>4.<\/b> <b>Log out and log back in<\/b>. Then launch <b>Kvantum Manager<\/b> from system app menu.<br \/>\nNavigate to &#8220;Change\/Delete Theme&#8221;, then select and apply <b>KvYaru<\/b> theme.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32980\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/kvyaru.png\" alt=\"\" width=\"500\" height=\"449\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/kvyaru.png 500w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/kvyaru-450x404.png 450w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\n<p>Now Qt5 apps should look native if you&#8217;re running with default Yaru GTK theme.<\/p>\n<h4>Uninstall and restore the changes:<\/h4>\n<p>To uninstall the PPA, open terminal and run command:<\/p>\n<pre style=\"border: none;\">sudo add-apt-repository --remove ppa:papirus\/papirus<\/pre>\n<p>To remove the theme engine, run command:<\/p>\n<pre style=\"border: none;\">sudo apt install qt5-style-kvantum qt5-style-kvantum-themes<\/pre>\n<p>And remember to edit <code style=\"border: none;\">~\/.profile<\/code> to <b>remove the last line<\/b>.<\/p>\n<pre style=\"border: none;\">gedit ~\/.profile<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32981\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/kvantum-profile.png\" alt=\"\" width=\"600\" height=\"366\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/kvantum-profile.png 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2020\/11\/kvantum-profile-450x275.png 450w\" sizes=\"auto, (max-width: 600px) 100vw, 600px\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>Found that Qt5 based applications (e.g., VLC, qBittorrent, Virtualbox, Audacious, etc.) look ugly on Ubuntu Desktop? That&#8217;s because they don&#8217;t inherit the global GTK theme. You can apply a custom theme to Qt5 applications to make them look native on Ubuntu Gnome desktop. And Kvantum, an SVG-based theme engine, can do the job. First let&#8217;s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[885],"class_list":["post-32972","post","type-post","status-publish","format-standard","hentry","category-howtos","tag-qt5"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/32972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=32972"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/32972\/revisions"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=32972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=32972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=32972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}