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

implement qHash(const QRectF &)

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • 5.6
    • None

    Description

      If you declare something like

          QHash<QRectF, MyClass*> m_monitoredAreas;
      

      you will run into the problem that qHash is not defined for QRectF. It seems like something we could provide. My naive implementation is

      uint qHash(const QRectF &r) {
          return qHash(r.width() * 1000000000 + r.height() * 1000000 + r.x() * 1000 + r.y());
      }
      

      At least it's possible to do this in the application.

      Attachments

        Issue Links

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

          Activity

            People

              Unassigned Unassigned
              srutledg Shawn Rutledge
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes