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

no matching showTearOffMenu convenience function for hideTearOffMenu

    XMLWordPrintable

Details

    • d19c9cfd29bcb3c8fb8108bbcb29d71be19711f5

    Description

      there is currently QMenu::hideTearOffMenu() function but no matching showTearOffMenu(QPoint) to do an initial tear off at a location

      in qmenu.cpp

      /*!
         This function will forcibly show the torn off menu making it
         appear on the users desktop.
      
         \sa hideTearOffMenu() isTearOffMenuVisible() isTearOffEnabled()
      */
      void QMenu::showTearOffMenu(QPoint *pos)
      {
          if (!d_func()->tornPopup)
              d_func()->tornPopup = new QTornOffMenu(this);
          QSize s = sizeHint();
          QPoint p;
          if(NULL != pos) {
              p.setX(pos->x());
              p.setY(pos->y());
          } else {
              p = QCursor::pos();
          }
          d_func()->tornPopup->setGeometry(p.x(), p.y(), s.width(), s.height());
          d_func()->tornPopup->show();
      }
      

      and added qmenu.h

      void showTearOffMenu(QPoint *pos=0);
      

      Attachments

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

        Activity

          People

            dedietri Gabriel de Dietrich (drgvond)
            warnold Wayne Arnold
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes