Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-56683

[Linux Deployment] Qt prebuilt binaries doesn't use system style / file dialogs

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P2: Important
    • None
    • 5.6.2
    • Core: Plugins
    • None
    • openSUSE Leap 42.1

    Description

      I use openSUSE Leap 42.1 as my main system. It has Qt 5.5.1 installed system-wide. Btw I use Qt 5.6.2 from Qt online installer for my apps.

      Problem: all apps built with 5.6 use fusion style and qt file dialogs. So I can't get native look'n'feel on all Qt based DE's. But on GTK based all works fine.
      I use startup script from Qt docs: https://doc.qt.io/qt-5/linux-deployment.html.

      As a workaround I use this in main.cpp:
      QStringList list = QCoreApplication::libraryPaths();
      list.append("/usr/lib64/qt5/plugins");
      list.append("/usr/lib/x86_64-linux-gnu/qt5/plugins/");
      QCoreApplication::setLibraryPaths(list);

      This hack works well on my machine, but on Kubuntu 16.10 with system-wide Qt 5.6.1 my program crashes (backtrace in attachment).

      Question: is there a convenient way to load system-wide style plugins? Can it be as simple as load native GTK style?

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            laknoll Lars Knoll
            magist3r Sergei Lopatin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes