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

QMainWindow size property getter and setter do not align when using Unified Toolbar on Cocoa

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Out of scope
    • Icon: P2: Important P2: Important
    • Some future release
    • 4.7.0
    • Widgets: Main Window
    • None
    • tested on 10.6 Cocoa build.

      The size() reports the size without the unifiedtoolbar, but calling resize resizes the whole window, including the toolbar.

      http://doc.trolltech.com/4.7/qmainwindow.html#unifiedTitleAndToolBarOnMac-prop

      //in any QMainWindow on mac with unified toolbar, for example the macmainwindow demo application.
      resize(500,500);
      qDebug() << "size" << size();
      //output:
      size QSize(500, 462)

      This is constant, so an easy workaround is to adjust the returned height value depending on the height of the toolbar.

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

            richard Richard Moe Gustavsen
            dettman Dean Dettman (Inactive)
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes