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

QVariant conversion possible between QMap and QHash

    XMLWordPrintable

Details

    Description

      Request is to add simple conversion possible between QMap and QHash. It's useful when e.g. client uses hash and plugin returns map and vice versa. No need to implement always conversion loop.
      Example:

      QVariant map = variantFromSource();
      if( map.canConvert(QVariantHash)) {
        QVariantHash hash = map.toHash();
        QVariant hash2 = QVariant::fromValue(hash);
        QVariantMap map2 = hash2.toMap();
      }
      

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            qtcomsupport Qt Support
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes