Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Help in software design and coding
Forum Updated to NodeBB v4.3 + New Features

Help in software design and coding

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 707 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    yugosonegi
    wrote on last edited by yugosonegi
    #1

    I'm developing a software and I need your help to design something with me as I'm a beginner in a few things (read beginner in model-view-delegate). In order to simplify things here I'm going to be using not real classes but metaphorical ones.
    The reason is that I haven't coded yet the thing I have in mind and I need help understanding a few things.

    tree

    The base idea: create a tree view based on the output from the class C.

    The class C is a kind of manager that calls a method from A and B, the A has a list of D and B has a list of E, where E is a kind of a container just like A and B but holds a list of D.

    And above that is the three how it would look like.

    The question is: what would be the best way to do that?

    1º - Using an interface for D and E so I can return a list of a certain interface on C to the model.
    2º - Use QVariant to return either D or E as a list from C to the model.

    I don't know what would be the best option.

    I would probably need to create a custom model to handle the QVariant or Interface right?

    HELP ME PLEASE. SOS.

    1 Reply Last reply
    0
    • Y Offline
      Y Offline
      yugosonegi
      wrote on last edited by
      #2

      Is there anyone to help me with that?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        First thing: Introduction to Model/View Programming. This is a mandatory read when you want to get started with model view programming with Qt.

        From what you describe the model you would need to implement would be a wrapper around your structure of data. So basically you must first ensure that said structure is coherent and that you can manipulate it the way you need it. Once that done you can put a model on top of it.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        2
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          On a side note, please be patient. Allow up to 24 hours before bumping your own thread. People answering do it on their own time and they don't live necessarily in the same timezone as you. Furthermore, it's the weekend.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved