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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P1: Critical
    • 5.0.1
    • 5.0.0 RC 2
    • Other
    • None
    • RC2 Mac
    • 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

        1. qmacextras_trace.txt
          42 kB
          Caroline Chao
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            sorvig Morten Sørvig
            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