Bug 252996 - Qt & KDE4 & native filedialog problem.
Summary: Qt & KDE4 & native filedialog problem.
Status: RESOLVED INTENTIONAL
Alias: None
Product: kde
Classification: I don't know
Component: general (other bugs)
Version First Reported In: 4.4
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: Unassigned bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-02 08:43 UTC by Teunizz
Modified: 2010-10-02 11:42 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Teunizz 2010-10-02 08:43:09 UTC
Version:           4.4 (using KDE 4.4.4) 
OS:                Linux

I wrote a platform independant application using Qt. I use the static function
of QFileDialog getOpenFileName() in order to get the native filedialogs.
This works with windows XP and with Ubuntu & Gnome.
The problem is that is does not work on openSUSE & KDE4.
On KDE4 I get the nonnative Qt QFileDialog.

I linked the Qt libraries static, so the right Qt libraries (4.6.3) are used at link- and runtime.

The admin of the KDE-forum told me that this is not possible with static linking.
So, my request is, can you please make it possible to get the native filedialog with Qt and static linking. It is possible with Gnome and windows (with static linking). KDE is still the only exception.

Thanks,

Teuniz


Reproducible: Always

Steps to Reproduce:
Link Qt static with an app and use the static function getOpenFileName() of QFileDialog.


Actual Results:  
On KDE4, it does not show the native filedialog.

Expected Results:  
It should show the native filedialog.
Comment 1 Christoph Feck 2010-10-02 11:42:11 UTC
The forum administrator is right; this is not possible with the way the KDE file dialog is designed in KDE4.

The file dialog is actually part of a separate shared library (kfilemodule.so) and when you link statically, you cannot expect this library to be loaded. Additionally, the file dialog requires KDE base libraries such as kdecore, kdeui, and kio, and those are only available as shared libraries on Linux platform.

Please do not use static linking on the Linux platform where we have package management with automatic dependency resolution. Some distributions would even reject packages which are linked statically to Qt. Linking your application statically to Qt 4.6.3 will annoy all customers that already have Qt 4.7.0 installed.

For Windows or Mac platform, where no such package management is available, you are free to use static linking.