Results 1 to 6 of 6

Thread: Access to shared map between parent - children

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2014
    Posts
    76
    Thanks
    17
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Access to shared map between parent - children

    Hi,

    In my applications I have class which contains QMap, and several child classes which execute tasks on the variables from this map.

    Now I would ask you, which way for communication between parent - child is a better in this case:
    - cast the parent pointer to the right type and then call parent function
    - store the pointer to the parent somewhere in the child when receiving it in the constructor

    or use signals and slots - send signal to parent with key as argument and then wait for value from map?
    But with signals and slots is a problem, because when child send signal with key to parent class then parent should send signal with value to only specific child object but signal is send to all child.

    Which way you choose when you have a similar problem?
    Thanks,
    Last edited by atomic; 10th August 2015 at 18:00.

Similar Threads

  1. Replies: 4
    Last Post: 4th March 2014, 19:28
  2. Replies: 6
    Last Post: 22nd December 2011, 21:03
  3. Replies: 0
    Last Post: 14th April 2010, 15:03
  4. disable a parent and children in a tree model
    By qt_gotcha in forum Newbie
    Replies: 4
    Last Post: 9th July 2009, 06:49

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.