Results 1 to 3 of 3

Thread: What if not Signal/Slot

  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default What if not Signal/Slot

    Hi,

    All of us here know how signal/slot makes our life easy. But how can we design our classes without signal/slot and still make them loosely coupled.

    Let me give an example :

    Let us consider QListWidget which is child of a some widget. This "some" widget is child of a QSplitter which in turn is Child of QMainWindow.

    Now, let us assume that there is no Signal/Slot and when user focuses in/out the QListWidget a menu item have to change. In the above situation what should be an ideal design ? How will the classes communicate with each other ?

    Thanks a lot for the idea and time.
    Thanks a lot.

  2. #2
    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: What is not Signal/Slot

    I believe you are looking for the Observer pattern.

  3. #3
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: What is not Signal/Slot

    Thanks for the reply. I found one more link which was useful.

Similar Threads

  1. Signal/slot looking in base class, not derived class
    By georgie in forum Qt Programming
    Replies: 2
    Last Post: 12th May 2006, 07:36
  2. Signal/slot connections of deleted items
    By Michiel in forum Newbie
    Replies: 2
    Last Post: 24th March 2006, 16:44
  3. queued signal/slot connection with QList<int>
    By smalls in forum Qt Programming
    Replies: 2
    Last Post: 7th February 2006, 14:32
  4. Replies: 4
    Last Post: 23rd January 2006, 16:51
  5. What's the relationship between signal/slot and event?
    By twosnowman in forum Qt Programming
    Replies: 4
    Last Post: 11th January 2006, 17:13

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.