Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QFileDialog style is different in static built qt
Forum Updated to NodeBB v4.3 + New Features

QFileDialog style is different in static built qt

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 2 Posters 695 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dalishi
    wrote on last edited by dalishi
    #1

    I'm getting different window style in my static qt build and dynamic qt build.

    QString filename = QFileDialog::getOpenFileName(this,
            tr("Open Image"), "/home", tr("Image Files (*.png *.jpg *.bmp)"));
    

    I built a static qt and linked to it, and i got this style:
    Screenshot from 2022-06-25 20-59-36.png
    I don’t mind this simple looking but I got errors when I browse files:

    Case insensitive sorting unsupported in the posix collation implementation
    Numeric mode unsupported in the posix collation implementation
    

    When I linked to the normal dynamic qt, I got the system style window without any errors:
    Screenshot from 2022-06-25 21-00-32.png

    I don't know whether this is related to GTK+ support in my static build qt. Fact is the static built qt doesn't have GTK+ support. And when I enabled the build options -gtk, configure says:

    Feature 'gtk3' was enabled, but the pre-condition 'features.glib && libs.gtk3' failed.
    

    I'm using Qt5.12 on Ubuntu1604.

    My question is how should I remove the "Case insensitive sorting unsupported" error and if possible, how to get system-looking window even with static built qt. Thanks.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Based on your error, you are missing the GTK3 development libraries.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      D 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        Based on your error, you are missing the GTK3 development libraries.

        D Offline
        D Offline
        dalishi
        wrote on last edited by
        #3

        Hi @SGaist Install the gtk3 dev does not eliminate the error "pre-condition 'features.glib && libs.gtk3' failed".

        sudo apt-get install libgtk-3-dev libglib2.0-dev
        
        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Did you do a configure rerun from a clean state ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          D 1 Reply Last reply
          0
          • SGaistS SGaist

            Did you do a configure rerun from a clean state ?

            D Offline
            D Offline
            dalishi
            wrote on last edited by
            #5

            @SGaist a clean state build works. Thanks.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved