Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QMultiHashIterator remove entry if QPointer.isNull()
Forum Updated to NodeBB v4.3 + New Features

QMultiHashIterator remove entry if QPointer.isNull()

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 604 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    onek24
    wrote on last edited by
    #1

    I've got a QMultiHash which has got a QPointer as it's value.
    @QMultiHash<QString, QPointer<QObject> > objectList;@
    What i want to do is iterate trough each entry in this MultiHash, i've done it with QMultiHash::iterator.
    @QMultiHash<QString, QPointer<QObject> >::iterator i = objectList.find("someKey");
    while(i != objectList.end() && i.key() == "someKey"){
    // Code
    }@
    Is it possible to check for i.key().isNull() and remove only this entry from the QMultiHash objectList if it is null?

    It should be possible to search for this value in objectList by using it's uniqueKey, but it looks like i can't access the QPointer function .isNull().

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved