Results 1 to 5 of 5

Thread: signal to signal

  1. #1
    Join Date
    Jul 2010
    Posts
    63
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default signal to signal

    just a small question:
    when i connect two signals - is the connection two way, or i need to make two connections? (one for each direction?)

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: signal to signal

    It's a one way direction.

    And please, for the love of something, don't create a second connection that does the reverse.
    Think about it.

    What do you want to achieve? Maybe there's another way.

  3. #3
    Join Date
    Jul 2010
    Posts
    63
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: signal to signal

    i want objects in 3d space to be deletable from both the render window and the objects menu (qtreewidget).

    got a different approach?

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: signal to signal

    So why not connect signals from the two actions to a single slot responsible for deletion? Or even place the same action in two places (that's what I'd do). I don't see how signal propagation would help you.
    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.


  5. #5
    Join Date
    Aug 2009
    Location
    Belgium
    Posts
    310
    Thanks
    10
    Thanked 31 Times in 25 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: signal to signal

    Hello,

    As I see it, both the render window and the objects menu are a way to show your collection of 3D objects.

    You should have something else (a class) to hold this collection of objects, and this class should have a method (or slot) to delete an object.

    Best regards,
    Marc

Similar Threads

  1. Signal connected to slot (or signal)
    By Althor in forum Newbie
    Replies: 2
    Last Post: 6th July 2010, 10:00
  2. signal mapping on pushbutton signal clicked
    By wagmare in forum Qt Programming
    Replies: 2
    Last Post: 17th March 2009, 07:54
  3. Signal-Signal Connections Between Threads
    By PhilippB in forum Qt Programming
    Replies: 2
    Last Post: 15th December 2008, 18:27
  4. Replies: 1
    Last Post: 8th November 2007, 17:11
  5. can i connect a signal to a signal
    By amit_pansuria in forum Qt Programming
    Replies: 1
    Last Post: 29th August 2007, 06: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.