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

QtMacUnifiedToolBar: it crashes if the widget showing it has no title

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P1: Critical
    • Resolution: Done
    • Affects Version/s: 5.0.0 RC 2
    • Fix Version/s: 5.0.1
    • Component/s: Other
    • Labels:
      None
    • Environment:
      RC2 Mac
    • Commits:
      56ef59f27a4b19cb84ced52f0340aaa98045332b

      Description

      Using QtMacExtras from http://qt.gitorious.org/qtplayground/qtmacextras

      And trying to implement an unified tool bar on Mac:

      #include <QApplication>
      #include <QMainWindow>
      #include "qtmacunifiedtoolbar.h"
      
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
          QMainWindow w;
         // w.setWindowTitle("Title");
          QtMacUnifiedToolBar toolBar;
          toolBar.addAction("First Action");
          toolBar.addAction("Second Action");
          toolBar.showInWindow(w.windowHandle());
          w.show();
          
          return a.exec();
      }
      

      The above example crashes if the title is not set on the window.

      Adding "setWindowTitle" and the toolbar is shown as expected.

        Attachments

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

          Activity

            People

            • Assignee:
              sorvig Morten Sørvig
              Reporter:
              carochao Caroline Chao (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes