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

Qt/Mac applications and -style argument

    XMLWordPrintable

Details

    • macOS

    Description

      Qt/Mac applications doesn't seem to honor the -style argument if you have a style set in your QSettings.

      This patch would resolve this:

      --- /tmp/tmp.23687.0    2007-07-10 13:55:59.000000000 -0700
      +++ /home/anders/dev/qt-4.3/src/gui/kernel/qapplication_mac.cpp 2007-07-10 13:55:37.000000000 -0700
      @@ -2462,15 +2462,14 @@ bool QApplicationPrivate::qt_mac_apply_s
               }
       
               // read new QStyle
      -        QString stylename = settings.value(QLatin1String("style")).toString();
      -        if(! stylename.isNull() && ! stylename.isEmpty()) {
      +        if (!app_style) {
      +            const QString stylename = settings.value(QLatin1String("style")).toString();
      +            if (!stylename.isEmpty()) {
                   QStyle *style = QStyleFactory::create(stylename);
      -            if(style)
      +                if (style) {
                       QApplication::setStyle(style);
      -            else
      -                stylename = QLatin1String("default");
      -        } else {
      -            stylename = QLatin1String("default");
      +                }
      +            }
               }
      

      num = settings.value(QLatin1String("doubleClickInterval"),

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            rve Anders Bakken
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes