Results 1 to 2 of 2

Thread: in SLOT: determine which signal sent the signal?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    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: in SLOT: determine which signal sent the signal?

    It looks like you need more than one slot.

    Slots should be implemented in such way that they don't need to know what signal was sent and who sent it. Otherwise you get tight coupling. "Do X or Y, depending on what happened" isn't a good way to code a slot. You should create two separate slots: "do X" and "do Y". This way you can decide what actions should be taken simply by establishing connections.

  2. The following user says thank you to jacek for this useful post:

    vonCZ (8th November 2007)

Similar Threads

  1. signal and slot across threads having event loop
    By travis in forum Qt Programming
    Replies: 6
    Last Post: 5th November 2007, 23:56
  2. Replies: 2
    Last Post: 16th August 2007, 00:20
  3. signal not getting communicated to slot
    By quickNitin in forum Qt Programming
    Replies: 17
    Last Post: 2nd June 2006, 04:56
  4. Manually send signal to slot
    By donmorr in forum Qt Programming
    Replies: 1
    Last Post: 29th May 2006, 15:03
  5. signal slot conection using a string, not a SLOT
    By rianquinn in forum Qt Programming
    Replies: 6
    Last Post: 5th February 2006, 18:52

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.