![]() Registered Member ![]()
|
Hello,
I hope somebody here can help me because I'm stuck with an annoying problem. 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. I installed the following packages: * GCC the sysytem GNU compiler * GCC C++ the system GNU C compiler * make * xorg-x11-devel Include Files and Libraries mandatory for X11 Development * GTK2-development files (for GTK-theme) * CUPS development files (for printing) I configured Qt as follows: ./configure -prefix /usr/local/Trolltech/Qt-static-4.6.3 -static -release -fast -no-qt3support -largefile -qt-zlib -qt-gif -qt-libpng -qt-libmng -qt-libjpeg -qt-libtiff -no-exceptions -no-multimedia -no-javascript-jit -no-script -cups -nomake demos -nomake examples -nomake tools -no-webkit -no-phonon -no-phonon-backend -no-xmlpatterns -no-declarative -no-dbus -gtkstyle -no-opengl -no-openvg -no-nas-sound -no-scripttools -no-openssl -no-nis On ubuntu & Gnome I get the native file-dialog. On openSUSE & KDE4 not. Can you please give me a hint howto get the native KDE filedialog with static linking? (dynamic linking is not an option for my application) |
![]() Administrator ![]()
|
In order to use the native KDE file dialog, you need to link to Qt dynamically.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Thank you for your reply. This means I don't need to blame myself. I'll put a request in the KDE bug tracking system and hope for the best. |
![]() Administrator ![]()
|
As far as I know, simply due to the design of KDE, it isn't possible to use it with statically built libraries....
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() KDE Developer ![]()
|
This is a limitation in Qt, not KDE.
Qt cannot guarantee that plugin loading works on all platforms when being linked statically. Especially not when the plugin is linked against a different version of Qt. There is no point in filing this in KDE's bugtracker, it will be closed as won't fix because this is out of their hands. You could file one at Nokia Qt Development Framework's tracker. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Then why does it work with other platforms? With the Qt-libs statically linked into the binary, I get the native filedialog on Gnome and windows. Only on KDE it's not possible to get the native filedialog whith static linking. |
![]() KDE Developer ![]()
|
Neither of these platforms uses Qt for implementing their filedialog, so the application isn't confronted with two Qt based code parts. Maybe there is a symbol version conflict or symbols can't be loaded from statically linked code and dynamically linked code at the same time, etc. In any case it is something that needs to be discussed with Nokia Qt Development Frameworks, because they are doing the platform integration, not any of the three platforms. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
![]() Registered Member ![]()
|
Thank you for your quick reply. I'll try to get some info from Qt/Nokia.
I already put a bugreport at Qt/Nokia but they closed it immediately because I forgot to mention that the "problem" occurs when linking static and the admin/moderator/employee wrote that it was caused by a configuration problem. I replied but (probably because the bug is closed) I get no response anymore. http://bugreports.qt.nokia.com/browse/QTBUG-14138 "Feeling stuck" between two parties, I opened a new bugreport where I added that it occurs with static linking. http://bugreports.qt.nokia.com/browse/QTBUG-14246 After having done that, I discovered a brand new Qt-forum from Nokia which I'll give a try as well. Best regards. |
![]() Registered Member ![]()
|
bugzilla (Nokia?) responded:
Chapter closed? |
![]() KDE Developer ![]()
|
Looks like it.
So my initial guess that it has something to do with statically built Qt not being able to load plugins was not that far off. Cheers, _
anda_skoa, proud to be a member of KDE forums since 2008-Oct.
|
Registered users: Bing [Bot], Evergrowing, Google [Bot], rockscient