Results 1 to 3 of 3

Thread: QSignalSpy a QHash signal

  1. #1

    Default QSignalSpy a QHash signal


    I am trying to test a signal using QSignalSpy. The signal being emitted is of type QHash<int,int>. I am having issues during the construction of the QSignalSpy object. The warning says "Unable to handle parameter ' ' of type QHash<int,int> of method ...

    I have looked into qregistermetatype, but from the documentation it says you only need to register the metatype if it is not known, and I believe that int(s) are a known metatype.

    If anyone could point me in the right direction in regards to testing a signal that is emitting a QHash please let me know.

    Thank you.

  2. #2
    Join Date
    Jul 2012
    Thanked 14 Times in 13 Posts
    Qt products

    Default Re: QSignalSpy a QHash signal

    Int is, but QHash<int,int> probably isnt. You have to do qRegistermetaType<QHash<int,int>>().

    Generally, always shows code + full error message.

  3. #3

    Default Re: QSignalSpy a QHash signal

    Got it,

    Thank you for your help.

Similar Threads

  1. qhash in qtscript
    By ivareske in forum Qt Programming
    Replies: 0
    Last Post: 18th December 2011, 11:43
  2. QSignalSpy
    By QTInfinity in forum Qt Programming
    Replies: 2
    Last Post: 29th June 2009, 11:00
  3. Replies: 1
    Last Post: 10th February 2009, 09:42
  4. QHash
    By coderbob in forum Qt Programming
    Replies: 2
    Last Post: 2nd July 2008, 14:29
  5. Can QHash::capacity() be smaller than QHash::size()?!?
    By iw2nhl in forum Qt Programming
    Replies: 2
    Last Post: 24th August 2007, 01:17


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.