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

[REG] OSX: QWidget::showMaximized()/showMinimized() don't work when Qt::FramelessWindowHint was set

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.5.0
    • 5.3.2, 5.4.0
    • QPA
    • None
    • Qt5.4.0 MacOSX10.9.x or MacOSX10.10.x
    • macOS

    Description

      When I custom the Window,so I should setWindowFlags(Qt::FramelessWindowHint),and Add Minimize button,When I clicke the button to set Minimize status,It's not effect。
      the follow code:
      setWindowFlags(Qt::FramelessWindowHint | Qt::Window);

      minmize code:

       if(gBDFrameView->isMaximized()){
              gBDFrameView->showNormal();
          }else{
              gBDFrameView->showMaximized();
          }
      

      but in china some one repair this bug
      here is a solution:
      open qt source code in qt/qtbase/src/plugins/platforms/cocoa.pro
      modify this qcocoawindow.mm
      this modified code can find in the attachment

      Attachments

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

        Activity

          People

            liaqi Liang Qi
            toby520 TobyYi
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes