Results 1 to 3 of 3

Thread: Passing pointer to object that emits a signal

  1. #1
    Join Date
    Mar 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Passing pointer to object that emits a signal

    Hello,

    I have an issue that I think I know what it is, but not sure.

    I have 3 classes:

    "Foo"

    "Foobar"

    "LittleFoo"


    LittleFoo emits a signal and I have a pointer to one of these objects in both Foo and Foobar, but this object is created in Foo.

    From Foo, I connect the signal emitted from LittleFoo to a private slot in Foo, I then pass a pointer of LittleFoo to Foobar where I do some additional work with LittleFoo (Gui interface to LittleFoo)

    When I make a change to LittleFoo inside Foobar, it stops emitting the signal inside Foo.

    Any suggestions?

    Thanks,
    Gadgetman53

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Passing pointer to object that emits a signal

    One suggestion: describe your problem again, code snippet would be better then this too complicated sentence.
    Anyway your description of problem is not sufficient to have any clue what is the problem.

  3. The following user says thank you to MarekR22 for this useful post:

    Gadgetman53 (17th April 2011)

  4. #3
    Join Date
    Mar 2011
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Passing pointer to object that emits a signal

    I figured it out. I wasn't using the method that starts the signals emitting. It's all good.

    Thanks for the reply


    Gadgetman53

Similar Threads

  1. Replies: 3
    Last Post: 2nd April 2011, 14:13
  2. Replies: 4
    Last Post: 23rd January 2011, 11:08
  3. Replies: 3
    Last Post: 30th July 2010, 17:34
  4. Passing a pointer in Signal/Slot Connection
    By mclark in forum Qt Programming
    Replies: 4
    Last Post: 6th November 2007, 20:04
  5. Replies: 2
    Last Post: 17th May 2006, 22:01

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.