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

Setting macos style before creating a QApplication crashes

    XMLWordPrintable

Details

    • macOS
    • 2bdc027f5c (qt/qtbase/dev) 2bdc027f5c (qt/tqtc-qtbase/dev) 9923c623ad (qt/tqtc-qtbase/6.2) 32af1fe7d3 (qt/qtbase/6.4) 32af1fe7d3 (qt/tqtc-qtbase/6.4)

    Description

      On macOS when setting the style as recommended in the documentation before creating a new `QApplication` object, everything works fine for the non macOS styles however when setting the macOS one, the application crashes. Even if there's no need to do that, a crash should not happen anyway since it should be the equivalent of a "noop".

       

      #include <QApplication>
      #include <QDebug>int main(int argc, char **argv)
      {
          QApplication::setStyle("macos");
          QApplication app(argc, argv);
          app.exec();
      }
      

      First discussed on this forum thread.

      Attachments

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

        Activity

          People

            vhilshei Volker Hilsheimer
            sgaist Samuel Gaist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes