Skip to content

QFileDialog fails to use platform-native dialog if static linked #33

Open
@hebasto

Description

@hebasto

While investigating #32 I found a buggy (?) behavior of QFileDialog.

From the Qt docs:

By default, a platform-native file dialog will be used if the platform has one.

When Qt and QPA plugin are dynamic linked:

$ ./src/qt/bitcoin-qt -printtoconsole
2020-07-15T09:15:39Z [main] Bitcoin Core version v0.20.0 (release build)
2020-07-15T09:15:39Z [main] Qt 5.12.8 (dynamic), plugin=xcb (dynamic)

QFileDialog works as expected, and uses a platform-native file dialog.


When Qt and QPA plugin are static linked (gitian builds):

$ /home/hebasto/bitcoin-0.20.0/bin/bitcoin-qt -printtoconsole
2020-07-15T09:07:04Z Bitcoin Core version v0.20.0 (release build)
2020-07-15T09:07:04Z Qt 5.9.8 (static), plugin=xcb (static)

QFileDialog fails to recognize the platform, and uses a widget-based implementation.

Even running with QT_QPA_PLATFORM=xcb doesn't help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething isn't workingLinux

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions