Results 1 to 20 of 22

Thread: Struggling with signal which has a default parameter.

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,372
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Struggling with signal which has a default parameter.

    The problem is what you said in post #13 - QMetaObject is stepping into a wrong case. It should go into 7 and not 8. Can you show us all places where you emit this signal? In post #6 there is an emit layoutChanged() but it seems this is a different "layoutChanged()".
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Aug 2008
    Posts
    132
    Thanks
    23
    Thanked 3 Times in 3 Posts

    Default Re: Struggling with signal which has a default parameter.

    I've updated my example in post #16 to show what the other layoutChanged() signal is. It will make more sense now, they should be independent. I can try to change the signal names as you said to see if it makes any difference.

  3. #3
    Join Date
    Aug 2008
    Posts
    132
    Thanks
    23
    Thanked 3 Times in 3 Posts

    Default Re: Struggling with signal which has a default parameter.

    I figured it out...

    Was my mistake. The observer class I mentioned is able to observe other observers creating a tree structure. The problem was that I emitted the signal in an observer low down in the tree and as the signal propagated through to the top observer (connected to the view) the parameter got lost since those connections were made without the parameters. I forgot that this is happening and thought I emitted the signal on the top level observer. My bad.

    Thanks for your help and time again.
    Cheers,
    Jaco

Similar Threads

  1. Slot - Signal with parameter
    By Lodhart in forum Newbie
    Replies: 8
    Last Post: 10th April 2013, 10:08
  2. Replies: 2
    Last Post: 6th July 2009, 12:53
  3. Replies: 3
    Last Post: 3rd May 2009, 14:15
  4. Struggling with QThread...
    By TemporalBeing in forum Qt Programming
    Replies: 2
    Last Post: 23rd March 2009, 20:46
  5. Struggling with value space
    By UnicycleBloke in forum Qt for Embedded and Mobile
    Replies: 3
    Last Post: 28th May 2008, 23:26

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
  •  
Qt is a trademark of The Qt Company.