How to setup VLC with gtk file dialog?












4















My long lasting previous installation somehow tied up VLC and gtk file dialog. I didn't even do anything special, except installing VLC.



After update to VLC 2.2.1 the file dialog was replaced to Qt and I don't see any obvious way how to get back with gtk. When I mark "vlc-qt" for deinstallation, entire vlc is marked for removal as well.



openSUSE 13.2










share|improve this question



























    4















    My long lasting previous installation somehow tied up VLC and gtk file dialog. I didn't even do anything special, except installing VLC.



    After update to VLC 2.2.1 the file dialog was replaced to Qt and I don't see any obvious way how to get back with gtk. When I mark "vlc-qt" for deinstallation, entire vlc is marked for removal as well.



    openSUSE 13.2










    share|improve this question

























      4












      4








      4


      1






      My long lasting previous installation somehow tied up VLC and gtk file dialog. I didn't even do anything special, except installing VLC.



      After update to VLC 2.2.1 the file dialog was replaced to Qt and I don't see any obvious way how to get back with gtk. When I mark "vlc-qt" for deinstallation, entire vlc is marked for removal as well.



      openSUSE 13.2










      share|improve this question














      My long lasting previous installation somehow tied up VLC and gtk file dialog. I didn't even do anything special, except installing VLC.



      After update to VLC 2.2.1 the file dialog was replaced to Qt and I don't see any obvious way how to get back with gtk. When I mark "vlc-qt" for deinstallation, entire vlc is marked for removal as well.



      openSUSE 13.2







      gtk vlc qt






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 9 '16 at 20:15









      greenoldmangreenoldman

      2,537104259




      2,537104259






















          2 Answers
          2






          active

          oldest

          votes


















          7














          VLC media player has been using Qt interface for quite long time. VLC however, has an option to override window style, which will also change the file dialog as well.



          In VLC media player, do the following steps:




          1. Go to Tools > Preferences (or press Ctrl+P)


          2. In the first tab, under Interface Settings - Look and feel, look for "Force window style:" with the drop-down menu and change selection from System's default to GTK+


          3. Finally, click Save to apply the changes.



          Then, go to Media > Open File... (or press Ctrl+O) to confirm that the file dialog has been applied with GTK+ window style. That's all.



          Tested with VLC 2.2.1 in Debian 8 Xfce (Xfce 4.10).



          Force style for Qt5 in Debian/Ubuntu



          Install libqt5libqgtk2 package from the repository, which is available for the following releases of Debian and Ubuntu. No further configuration is needed.




          • Debian Testing (stretch) and newer


          • Ubuntu 15.10 (wily) and newer



          Tested with VLC 2.2.2 in Xubuntu 16.04 (Xfce 4.12). I did not test in Debian, but reportedly works according to this post on Ask Ubuntu.



          Force style for Qt5 in other distributions



          The package above is not available in repositories of other distributions, including openSUSE, according to this search result from software.opensuse.org. As an alternative, this Arch Wiki noted that QT_STYLE_OVERRIDE environment variable will force specific style to Qt applications.



          Therefore, the line QT_STYLE_OVERRIDE=gtk2 or QT_STYLE_OVERRIDE=GTK+ may be added in one of the following locations:




          • ~/.profile (reportedly works in Linux Mint, suggested in this post on Unix.SE)


          • ~/.bashrc (suggested in this post on Ask Ubuntu)


          • ~/.xsession or ~/.xinitrc (suggested in this post on FreeBSD forum)


          • ~/.xsessionrc (suggested for OpenBox in this post on CrunchBang Linux forum)



          Without installing the Qt5 package, I have tried export the line to each of above configuration files one at a time, except for the last one. However, none of these worked for VLC in Xubuntu 16.04.



          At the moment, I can't verify whether the environment variable actually works or not.






          share|improve this answer





















          • 1





            Thank you, I already have such settings, but despite it VLC still uses Qt open dialog.

            – greenoldman
            Jun 14 '16 at 6:04






          • 1





            @greenoldman Updated my answer. I couldn't find what will actually work in other distributions to force style in Qt5 applications.

            – clearkimura
            Jun 18 '16 at 5:55






          • 2





            THANK YOU! Your last solution is setting the environment settings, so fast and dirty way to check it is to run QT_STYLE_OVERRIDE=GTK+ vlc and... it worked. So thank you very much for your help, I wish I could give you more points :-)

            – greenoldman
            Jun 18 '16 at 6:26






          • 1





            @greenoldman I tried again but failed to work in Xubuntu 16.04. I guess other distributions handle Qt5 differently from Debian/Ubuntu.

            – clearkimura
            Jun 18 '16 at 6:31











          • Thanks, man. I have installed libqt5libqgtk2 via Synaptic in Linux Mint Serena and after that the file open dialog in VLC looks really native. The old one didn't even allow to open media files from hard drives that were not mounted yet (but plugged) and it wasn't quite intuitive.

            – Vladimir Svyatski
            Dec 29 '16 at 10:07



















          1














          I would like to amend the accepted answer on how to get Qt to use the GTK+ theme (VLC now (2018) uses Qt5, so go by the second item).





          • Qt4 can use the current GTK2 theme. To activate this, simply choose GTK+ as the style for Qt4 in its configuration file ~/.config/Trolltech.conf (or using any graphical tool for configuring Qt4):



            [Qt]
            style=GTK+



          • Qt5 had support for GTK+ theming moved from the main package to a separate one. On ArchLinux, it is called qt5-styleplugins. Moreover, selecting the theme apparently goes by setting an environment variable, either QT_STYLE_OVERRIDE or QT_QAP_PLATFORMTHEME (both work for me), to gtk2 (notice this is gtk2, not GTK+). Adding this setting to any of the script files listed by the accepted answer will do the trick. I would personally argue in favor of ~/.xinitrc or similar, as this is related to the graphical environment.



            To sum up: on ArchLinux, install the package qt5-styleplugins, then launch your Qt5 application (VLC here) with QT_STYLE_OVERRIDE=gtk2 set in the environment.




          Links: Arch Wiki on “Qt”, Arch Wiki on “Uniform look for Qt and GTK applications”.






          share|improve this answer























            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "106"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f261087%2fhow-to-setup-vlc-with-gtk-file-dialog%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            7














            VLC media player has been using Qt interface for quite long time. VLC however, has an option to override window style, which will also change the file dialog as well.



            In VLC media player, do the following steps:




            1. Go to Tools > Preferences (or press Ctrl+P)


            2. In the first tab, under Interface Settings - Look and feel, look for "Force window style:" with the drop-down menu and change selection from System's default to GTK+


            3. Finally, click Save to apply the changes.



            Then, go to Media > Open File... (or press Ctrl+O) to confirm that the file dialog has been applied with GTK+ window style. That's all.



            Tested with VLC 2.2.1 in Debian 8 Xfce (Xfce 4.10).



            Force style for Qt5 in Debian/Ubuntu



            Install libqt5libqgtk2 package from the repository, which is available for the following releases of Debian and Ubuntu. No further configuration is needed.




            • Debian Testing (stretch) and newer


            • Ubuntu 15.10 (wily) and newer



            Tested with VLC 2.2.2 in Xubuntu 16.04 (Xfce 4.12). I did not test in Debian, but reportedly works according to this post on Ask Ubuntu.



            Force style for Qt5 in other distributions



            The package above is not available in repositories of other distributions, including openSUSE, according to this search result from software.opensuse.org. As an alternative, this Arch Wiki noted that QT_STYLE_OVERRIDE environment variable will force specific style to Qt applications.



            Therefore, the line QT_STYLE_OVERRIDE=gtk2 or QT_STYLE_OVERRIDE=GTK+ may be added in one of the following locations:




            • ~/.profile (reportedly works in Linux Mint, suggested in this post on Unix.SE)


            • ~/.bashrc (suggested in this post on Ask Ubuntu)


            • ~/.xsession or ~/.xinitrc (suggested in this post on FreeBSD forum)


            • ~/.xsessionrc (suggested for OpenBox in this post on CrunchBang Linux forum)



            Without installing the Qt5 package, I have tried export the line to each of above configuration files one at a time, except for the last one. However, none of these worked for VLC in Xubuntu 16.04.



            At the moment, I can't verify whether the environment variable actually works or not.






            share|improve this answer





















            • 1





              Thank you, I already have such settings, but despite it VLC still uses Qt open dialog.

              – greenoldman
              Jun 14 '16 at 6:04






            • 1





              @greenoldman Updated my answer. I couldn't find what will actually work in other distributions to force style in Qt5 applications.

              – clearkimura
              Jun 18 '16 at 5:55






            • 2





              THANK YOU! Your last solution is setting the environment settings, so fast and dirty way to check it is to run QT_STYLE_OVERRIDE=GTK+ vlc and... it worked. So thank you very much for your help, I wish I could give you more points :-)

              – greenoldman
              Jun 18 '16 at 6:26






            • 1





              @greenoldman I tried again but failed to work in Xubuntu 16.04. I guess other distributions handle Qt5 differently from Debian/Ubuntu.

              – clearkimura
              Jun 18 '16 at 6:31











            • Thanks, man. I have installed libqt5libqgtk2 via Synaptic in Linux Mint Serena and after that the file open dialog in VLC looks really native. The old one didn't even allow to open media files from hard drives that were not mounted yet (but plugged) and it wasn't quite intuitive.

              – Vladimir Svyatski
              Dec 29 '16 at 10:07
















            7














            VLC media player has been using Qt interface for quite long time. VLC however, has an option to override window style, which will also change the file dialog as well.



            In VLC media player, do the following steps:




            1. Go to Tools > Preferences (or press Ctrl+P)


            2. In the first tab, under Interface Settings - Look and feel, look for "Force window style:" with the drop-down menu and change selection from System's default to GTK+


            3. Finally, click Save to apply the changes.



            Then, go to Media > Open File... (or press Ctrl+O) to confirm that the file dialog has been applied with GTK+ window style. That's all.



            Tested with VLC 2.2.1 in Debian 8 Xfce (Xfce 4.10).



            Force style for Qt5 in Debian/Ubuntu



            Install libqt5libqgtk2 package from the repository, which is available for the following releases of Debian and Ubuntu. No further configuration is needed.




            • Debian Testing (stretch) and newer


            • Ubuntu 15.10 (wily) and newer



            Tested with VLC 2.2.2 in Xubuntu 16.04 (Xfce 4.12). I did not test in Debian, but reportedly works according to this post on Ask Ubuntu.



            Force style for Qt5 in other distributions



            The package above is not available in repositories of other distributions, including openSUSE, according to this search result from software.opensuse.org. As an alternative, this Arch Wiki noted that QT_STYLE_OVERRIDE environment variable will force specific style to Qt applications.



            Therefore, the line QT_STYLE_OVERRIDE=gtk2 or QT_STYLE_OVERRIDE=GTK+ may be added in one of the following locations:




            • ~/.profile (reportedly works in Linux Mint, suggested in this post on Unix.SE)


            • ~/.bashrc (suggested in this post on Ask Ubuntu)


            • ~/.xsession or ~/.xinitrc (suggested in this post on FreeBSD forum)


            • ~/.xsessionrc (suggested for OpenBox in this post on CrunchBang Linux forum)



            Without installing the Qt5 package, I have tried export the line to each of above configuration files one at a time, except for the last one. However, none of these worked for VLC in Xubuntu 16.04.



            At the moment, I can't verify whether the environment variable actually works or not.






            share|improve this answer





















            • 1





              Thank you, I already have such settings, but despite it VLC still uses Qt open dialog.

              – greenoldman
              Jun 14 '16 at 6:04






            • 1





              @greenoldman Updated my answer. I couldn't find what will actually work in other distributions to force style in Qt5 applications.

              – clearkimura
              Jun 18 '16 at 5:55






            • 2





              THANK YOU! Your last solution is setting the environment settings, so fast and dirty way to check it is to run QT_STYLE_OVERRIDE=GTK+ vlc and... it worked. So thank you very much for your help, I wish I could give you more points :-)

              – greenoldman
              Jun 18 '16 at 6:26






            • 1





              @greenoldman I tried again but failed to work in Xubuntu 16.04. I guess other distributions handle Qt5 differently from Debian/Ubuntu.

              – clearkimura
              Jun 18 '16 at 6:31











            • Thanks, man. I have installed libqt5libqgtk2 via Synaptic in Linux Mint Serena and after that the file open dialog in VLC looks really native. The old one didn't even allow to open media files from hard drives that were not mounted yet (but plugged) and it wasn't quite intuitive.

              – Vladimir Svyatski
              Dec 29 '16 at 10:07














            7












            7








            7







            VLC media player has been using Qt interface for quite long time. VLC however, has an option to override window style, which will also change the file dialog as well.



            In VLC media player, do the following steps:




            1. Go to Tools > Preferences (or press Ctrl+P)


            2. In the first tab, under Interface Settings - Look and feel, look for "Force window style:" with the drop-down menu and change selection from System's default to GTK+


            3. Finally, click Save to apply the changes.



            Then, go to Media > Open File... (or press Ctrl+O) to confirm that the file dialog has been applied with GTK+ window style. That's all.



            Tested with VLC 2.2.1 in Debian 8 Xfce (Xfce 4.10).



            Force style for Qt5 in Debian/Ubuntu



            Install libqt5libqgtk2 package from the repository, which is available for the following releases of Debian and Ubuntu. No further configuration is needed.




            • Debian Testing (stretch) and newer


            • Ubuntu 15.10 (wily) and newer



            Tested with VLC 2.2.2 in Xubuntu 16.04 (Xfce 4.12). I did not test in Debian, but reportedly works according to this post on Ask Ubuntu.



            Force style for Qt5 in other distributions



            The package above is not available in repositories of other distributions, including openSUSE, according to this search result from software.opensuse.org. As an alternative, this Arch Wiki noted that QT_STYLE_OVERRIDE environment variable will force specific style to Qt applications.



            Therefore, the line QT_STYLE_OVERRIDE=gtk2 or QT_STYLE_OVERRIDE=GTK+ may be added in one of the following locations:




            • ~/.profile (reportedly works in Linux Mint, suggested in this post on Unix.SE)


            • ~/.bashrc (suggested in this post on Ask Ubuntu)


            • ~/.xsession or ~/.xinitrc (suggested in this post on FreeBSD forum)


            • ~/.xsessionrc (suggested for OpenBox in this post on CrunchBang Linux forum)



            Without installing the Qt5 package, I have tried export the line to each of above configuration files one at a time, except for the last one. However, none of these worked for VLC in Xubuntu 16.04.



            At the moment, I can't verify whether the environment variable actually works or not.






            share|improve this answer















            VLC media player has been using Qt interface for quite long time. VLC however, has an option to override window style, which will also change the file dialog as well.



            In VLC media player, do the following steps:




            1. Go to Tools > Preferences (or press Ctrl+P)


            2. In the first tab, under Interface Settings - Look and feel, look for "Force window style:" with the drop-down menu and change selection from System's default to GTK+


            3. Finally, click Save to apply the changes.



            Then, go to Media > Open File... (or press Ctrl+O) to confirm that the file dialog has been applied with GTK+ window style. That's all.



            Tested with VLC 2.2.1 in Debian 8 Xfce (Xfce 4.10).



            Force style for Qt5 in Debian/Ubuntu



            Install libqt5libqgtk2 package from the repository, which is available for the following releases of Debian and Ubuntu. No further configuration is needed.




            • Debian Testing (stretch) and newer


            • Ubuntu 15.10 (wily) and newer



            Tested with VLC 2.2.2 in Xubuntu 16.04 (Xfce 4.12). I did not test in Debian, but reportedly works according to this post on Ask Ubuntu.



            Force style for Qt5 in other distributions



            The package above is not available in repositories of other distributions, including openSUSE, according to this search result from software.opensuse.org. As an alternative, this Arch Wiki noted that QT_STYLE_OVERRIDE environment variable will force specific style to Qt applications.



            Therefore, the line QT_STYLE_OVERRIDE=gtk2 or QT_STYLE_OVERRIDE=GTK+ may be added in one of the following locations:




            • ~/.profile (reportedly works in Linux Mint, suggested in this post on Unix.SE)


            • ~/.bashrc (suggested in this post on Ask Ubuntu)


            • ~/.xsession or ~/.xinitrc (suggested in this post on FreeBSD forum)


            • ~/.xsessionrc (suggested for OpenBox in this post on CrunchBang Linux forum)



            Without installing the Qt5 package, I have tried export the line to each of above configuration files one at a time, except for the last one. However, none of these worked for VLC in Xubuntu 16.04.



            At the moment, I can't verify whether the environment variable actually works or not.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited 10 hours ago

























            answered Jun 13 '16 at 9:54









            clearkimuraclearkimura

            1,9851030




            1,9851030








            • 1





              Thank you, I already have such settings, but despite it VLC still uses Qt open dialog.

              – greenoldman
              Jun 14 '16 at 6:04






            • 1





              @greenoldman Updated my answer. I couldn't find what will actually work in other distributions to force style in Qt5 applications.

              – clearkimura
              Jun 18 '16 at 5:55






            • 2





              THANK YOU! Your last solution is setting the environment settings, so fast and dirty way to check it is to run QT_STYLE_OVERRIDE=GTK+ vlc and... it worked. So thank you very much for your help, I wish I could give you more points :-)

              – greenoldman
              Jun 18 '16 at 6:26






            • 1





              @greenoldman I tried again but failed to work in Xubuntu 16.04. I guess other distributions handle Qt5 differently from Debian/Ubuntu.

              – clearkimura
              Jun 18 '16 at 6:31











            • Thanks, man. I have installed libqt5libqgtk2 via Synaptic in Linux Mint Serena and after that the file open dialog in VLC looks really native. The old one didn't even allow to open media files from hard drives that were not mounted yet (but plugged) and it wasn't quite intuitive.

              – Vladimir Svyatski
              Dec 29 '16 at 10:07














            • 1





              Thank you, I already have such settings, but despite it VLC still uses Qt open dialog.

              – greenoldman
              Jun 14 '16 at 6:04






            • 1





              @greenoldman Updated my answer. I couldn't find what will actually work in other distributions to force style in Qt5 applications.

              – clearkimura
              Jun 18 '16 at 5:55






            • 2





              THANK YOU! Your last solution is setting the environment settings, so fast and dirty way to check it is to run QT_STYLE_OVERRIDE=GTK+ vlc and... it worked. So thank you very much for your help, I wish I could give you more points :-)

              – greenoldman
              Jun 18 '16 at 6:26






            • 1





              @greenoldman I tried again but failed to work in Xubuntu 16.04. I guess other distributions handle Qt5 differently from Debian/Ubuntu.

              – clearkimura
              Jun 18 '16 at 6:31











            • Thanks, man. I have installed libqt5libqgtk2 via Synaptic in Linux Mint Serena and after that the file open dialog in VLC looks really native. The old one didn't even allow to open media files from hard drives that were not mounted yet (but plugged) and it wasn't quite intuitive.

              – Vladimir Svyatski
              Dec 29 '16 at 10:07








            1




            1





            Thank you, I already have such settings, but despite it VLC still uses Qt open dialog.

            – greenoldman
            Jun 14 '16 at 6:04





            Thank you, I already have such settings, but despite it VLC still uses Qt open dialog.

            – greenoldman
            Jun 14 '16 at 6:04




            1




            1





            @greenoldman Updated my answer. I couldn't find what will actually work in other distributions to force style in Qt5 applications.

            – clearkimura
            Jun 18 '16 at 5:55





            @greenoldman Updated my answer. I couldn't find what will actually work in other distributions to force style in Qt5 applications.

            – clearkimura
            Jun 18 '16 at 5:55




            2




            2





            THANK YOU! Your last solution is setting the environment settings, so fast and dirty way to check it is to run QT_STYLE_OVERRIDE=GTK+ vlc and... it worked. So thank you very much for your help, I wish I could give you more points :-)

            – greenoldman
            Jun 18 '16 at 6:26





            THANK YOU! Your last solution is setting the environment settings, so fast and dirty way to check it is to run QT_STYLE_OVERRIDE=GTK+ vlc and... it worked. So thank you very much for your help, I wish I could give you more points :-)

            – greenoldman
            Jun 18 '16 at 6:26




            1




            1





            @greenoldman I tried again but failed to work in Xubuntu 16.04. I guess other distributions handle Qt5 differently from Debian/Ubuntu.

            – clearkimura
            Jun 18 '16 at 6:31





            @greenoldman I tried again but failed to work in Xubuntu 16.04. I guess other distributions handle Qt5 differently from Debian/Ubuntu.

            – clearkimura
            Jun 18 '16 at 6:31













            Thanks, man. I have installed libqt5libqgtk2 via Synaptic in Linux Mint Serena and after that the file open dialog in VLC looks really native. The old one didn't even allow to open media files from hard drives that were not mounted yet (but plugged) and it wasn't quite intuitive.

            – Vladimir Svyatski
            Dec 29 '16 at 10:07





            Thanks, man. I have installed libqt5libqgtk2 via Synaptic in Linux Mint Serena and after that the file open dialog in VLC looks really native. The old one didn't even allow to open media files from hard drives that were not mounted yet (but plugged) and it wasn't quite intuitive.

            – Vladimir Svyatski
            Dec 29 '16 at 10:07













            1














            I would like to amend the accepted answer on how to get Qt to use the GTK+ theme (VLC now (2018) uses Qt5, so go by the second item).





            • Qt4 can use the current GTK2 theme. To activate this, simply choose GTK+ as the style for Qt4 in its configuration file ~/.config/Trolltech.conf (or using any graphical tool for configuring Qt4):



              [Qt]
              style=GTK+



            • Qt5 had support for GTK+ theming moved from the main package to a separate one. On ArchLinux, it is called qt5-styleplugins. Moreover, selecting the theme apparently goes by setting an environment variable, either QT_STYLE_OVERRIDE or QT_QAP_PLATFORMTHEME (both work for me), to gtk2 (notice this is gtk2, not GTK+). Adding this setting to any of the script files listed by the accepted answer will do the trick. I would personally argue in favor of ~/.xinitrc or similar, as this is related to the graphical environment.



              To sum up: on ArchLinux, install the package qt5-styleplugins, then launch your Qt5 application (VLC here) with QT_STYLE_OVERRIDE=gtk2 set in the environment.




            Links: Arch Wiki on “Qt”, Arch Wiki on “Uniform look for Qt and GTK applications”.






            share|improve this answer




























              1














              I would like to amend the accepted answer on how to get Qt to use the GTK+ theme (VLC now (2018) uses Qt5, so go by the second item).





              • Qt4 can use the current GTK2 theme. To activate this, simply choose GTK+ as the style for Qt4 in its configuration file ~/.config/Trolltech.conf (or using any graphical tool for configuring Qt4):



                [Qt]
                style=GTK+



              • Qt5 had support for GTK+ theming moved from the main package to a separate one. On ArchLinux, it is called qt5-styleplugins. Moreover, selecting the theme apparently goes by setting an environment variable, either QT_STYLE_OVERRIDE or QT_QAP_PLATFORMTHEME (both work for me), to gtk2 (notice this is gtk2, not GTK+). Adding this setting to any of the script files listed by the accepted answer will do the trick. I would personally argue in favor of ~/.xinitrc or similar, as this is related to the graphical environment.



                To sum up: on ArchLinux, install the package qt5-styleplugins, then launch your Qt5 application (VLC here) with QT_STYLE_OVERRIDE=gtk2 set in the environment.




              Links: Arch Wiki on “Qt”, Arch Wiki on “Uniform look for Qt and GTK applications”.






              share|improve this answer


























                1












                1








                1







                I would like to amend the accepted answer on how to get Qt to use the GTK+ theme (VLC now (2018) uses Qt5, so go by the second item).





                • Qt4 can use the current GTK2 theme. To activate this, simply choose GTK+ as the style for Qt4 in its configuration file ~/.config/Trolltech.conf (or using any graphical tool for configuring Qt4):



                  [Qt]
                  style=GTK+



                • Qt5 had support for GTK+ theming moved from the main package to a separate one. On ArchLinux, it is called qt5-styleplugins. Moreover, selecting the theme apparently goes by setting an environment variable, either QT_STYLE_OVERRIDE or QT_QAP_PLATFORMTHEME (both work for me), to gtk2 (notice this is gtk2, not GTK+). Adding this setting to any of the script files listed by the accepted answer will do the trick. I would personally argue in favor of ~/.xinitrc or similar, as this is related to the graphical environment.



                  To sum up: on ArchLinux, install the package qt5-styleplugins, then launch your Qt5 application (VLC here) with QT_STYLE_OVERRIDE=gtk2 set in the environment.




                Links: Arch Wiki on “Qt”, Arch Wiki on “Uniform look for Qt and GTK applications”.






                share|improve this answer













                I would like to amend the accepted answer on how to get Qt to use the GTK+ theme (VLC now (2018) uses Qt5, so go by the second item).





                • Qt4 can use the current GTK2 theme. To activate this, simply choose GTK+ as the style for Qt4 in its configuration file ~/.config/Trolltech.conf (or using any graphical tool for configuring Qt4):



                  [Qt]
                  style=GTK+



                • Qt5 had support for GTK+ theming moved from the main package to a separate one. On ArchLinux, it is called qt5-styleplugins. Moreover, selecting the theme apparently goes by setting an environment variable, either QT_STYLE_OVERRIDE or QT_QAP_PLATFORMTHEME (both work for me), to gtk2 (notice this is gtk2, not GTK+). Adding this setting to any of the script files listed by the accepted answer will do the trick. I would personally argue in favor of ~/.xinitrc or similar, as this is related to the graphical environment.



                  To sum up: on ArchLinux, install the package qt5-styleplugins, then launch your Qt5 application (VLC here) with QT_STYLE_OVERRIDE=gtk2 set in the environment.




                Links: Arch Wiki on “Qt”, Arch Wiki on “Uniform look for Qt and GTK applications”.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Apr 29 '18 at 21:20









                MaëlanMaëlan

                165




                165






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Unix & Linux Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f261087%2fhow-to-setup-vlc-with-gtk-file-dialog%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Loup dans la culture

                    How to solve the problem of ntp “Unable to contact time server” from KDE?

                    ASUS Zenbook UX433/UX333 — Configure Touchpad-embedded numpad on Linux