QFileDialog style is different in static built qt
-
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:
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:
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.
-
Hi,
Based on your error, you are missing the GTK3 development libraries.
-
Did you do a configure rerun from a clean state ?