Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66043

GTK3 theme ignores command line options and terminates application



    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.10.0, 5.9.4
    • Fix Version/s: None
    • Component/s: Widgets: Styles
    • Labels:


      1) Have GTK3 Qt platform theme installed,
      2) unset DISPLAY
      3) Run any Qt application with a proper -display option (for example: "qtpass -display :0")
      4) See that it terminates with "(qtpass:994954): Gtk-WARNING **: cannot open display:"

      This bug is caused by src/plugins/platformthemes/gtk3/qgtk3theme.cpp QGtk3Theme::QGtk3Theme() calling gtk_init(0, 0), that is, without passing any argc and argv
      arguments to the GTK toolkit.

      GTK docs say that "This function will terminate your program if it was unable to initialize the windowing system for some reason" and so it does.

      Expected result:
      GTK3 Qt platform theme should pass the necessary options to the GTK initialization.
      If that is not possible it should use gtk_init_check() instead of gtk_init().
      This function does not terminate the program if the windowing system can't be initialized and
      so in this case the theme plugin can simply be skipped.

      There was a similar bug QTBUG-41695 for Qt4.


          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              • Assignee:
                paeglis Gatis Paeglis
                mhej Maciej Szmigiero
              • Votes:
                0 Vote for this issue
                3 Start watching this issue


                • Created:

                  Gerrit Reviews

                  There are no open Gerrit changes