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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P1: Critical P1: Critical
    • 5.0.1
    • 5.0.0 RC 2
    • Other
    • None
    • RC2 Mac
    • 56ef59f27a4b19cb84ced52f0340aaa98045332b

      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.

        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.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes