appmenu-qt5 prevents apps from using native Gtk+ dialogs

Bug #1378935 reported by Dmitry Shachnev
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
appmenu-qt5
New
Undecided
Unassigned
appmenu-qt5 (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Hi,

QtBase ships with a platform theme called "gtk2", which enables native file dialog, color dialog and font dialog on Gtk-based environments (such as Unity and GNOME).

https://qt.gitorious.org/qt/qtbase/source/5.3:src/platformsupport/themes/genericunix/qgenericunixthemes.cpp#L593

However, when appmenu-qt5 is installed, the platform theme is forcibly set to "appmenu-qt5" (via /etc/profile.d/appmenu-qt5.sh). Thus, the advantages of gtk2 theme like native dialogs are not available.

Test case:

0) Install qtcreator and appmenu-qt5;
1) Launch qtcreator and select "Open Project";
2) Launch "QT_QPA_PLATFORMTHEME= qtcreator" and select "Open Project".

In case 1), the standard Qt file dialog will be used (looking a stranger in Gtk environment).
In case 2), the native Gtk+ file dialog will be used (looking nice).

Changed in appmenu-qt5 (Ubuntu):
importance: Undecided → High
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Yeah, this is a known issue. When I was first creating appmenu-qt5 there simply was no gtk2 platformtheme, so extending QGnomeTheme was enough. Now indeed we might need to find a solution to actually use the gtk2 theme somehow, too bad only one theme can be loaded by default. Well, nothing we cannot work around.

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

I am going to check if we can ldopen() gtk2.so (using QLibrary) and steal some methods from there, including the icon theme stuff.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Dmitry, did you look at that?

Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Sebastien, the long-term plan is to implement global menus support in Qt itself so that appmenu-qt5 becomes redundant.

This will be in Qt 5.6 but we can backport it to our packages next cycle.

See https://codereview.qt-project.org/103701.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in appmenu-qt5 (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.