Results 1 to 5 of 5

Thread: What's wrong with this connection??

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question What's wrong with this connection??

    Hi all, I have the following connection:

    Qt Code:
    1. qRegisterMetaType<ManegadorParamsProcessat::ResultatProcessat>("ResultatProcessat");
    2. connect(&fotosThread, SIGNAL(nouFitxerProcessat(const QString &,
    3. ManegadorParamsProcessat::ResultatProcessat, double)), this,
    4. SLOT(novaFotoProcessada(const QString &, ManegadorParamsProcessat::ResultatProcessat,
    5. double)));
    To copy to clipboard, switch view to plain text mode 

    when I execute the program with gdb debugger it alerts me that QObject::connect cannot queue arguments of type 'ManegadorParamsProcessat::ResultatProcessat'

    I've defined 'ManegadorParamsProcessat::ResultatProcessat' in this way:
    Qt Code:
    1. enum ResultatProcessat {ProcessatCorrecte, AnomaliesContorn, NomesFons, FitxerInvalid, ProcessatManual, ProcessatInvalid};
    To copy to clipboard, switch view to plain text mode 
    in the class 'ManegadorParamsProcessat'. I make the include to this class in the header of the class where I do the connection. So I dont' know what's wrong, anybody knows it?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: What's wrong with this connection??


  3. #3
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What's wrong with this connection??

    Thanks jacek, i'm gonna try it as the other post comments. The strange of the situation is that the same connection worked inserting the 'ResultatProcessat' enum in the class of the object that emits the signal. Very strange Do you know the reason?
    Last edited by SkripT; 12th March 2006 at 18:42.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: What's wrong with this connection??

    Quote Originally Posted by SkripT
    the same connection worked inserting the 'ResultatProcessat' enum in the class of the object that emits the signal.
    Did you declare this enum as public?

  5. #5
    Join Date
    Jan 2006
    Location
    Catalonia
    Posts
    266
    Thanks
    44
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: What's wrong with this connection??

    Yes, of course. Finally it works declaring it with typedef. Thanks again.

Similar Threads

  1. A simple HTTP server going wrong.
    By spraff in forum Qt Programming
    Replies: 1
    Last Post: 12th November 2008, 21:09
  2. wrong connection? program crashes altough it compiles
    By cbarmpar in forum Qt Programming
    Replies: 7
    Last Post: 30th September 2008, 13:48
  3. SQL connection closure problem.
    By cbarmpar in forum Qt Programming
    Replies: 1
    Last Post: 8th September 2008, 09:42
  4. Client/Server Error: BadIDChoice
    By 3nc31 in forum Qt Programming
    Replies: 5
    Last Post: 27th November 2007, 11:22
  5. Replies: 3
    Last Post: 2nd August 2007, 22:28

Bookmarks

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.