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

Details

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

    Description

      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.

      Attachments

        1. mainwindow.cpp
          11 kB
          Taliesin Beynon
        2. Screen shot 2011-01-03 at 3.24.08 PM.png
          22 kB
          Taliesin Beynon
        3. Screen shot 2011-01-03 at 3.24.15 PM.png
          15 kB
          Taliesin Beynon
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes