Important: Please read the Qt Code of Conduct -

How to implement a framework and objects scheme

  • I like to program interfaces as follows. Define a framework which is a structure of places to put widgets on, and then have objects, and put them there. All programmatically. I more or less can do this in Qt, but quickly get confused by the many possible ways of doing it and my code becames ugly and buggy. I would like to know the proper idiom to do this in Qt. Example:


    | place1 | place2 |
    | |
    | place3 |

    And objects ob1 .. ob5, each of which must be possible to fit in any place1 .. place3.
    Furthermore, I want be possible for the same object to appear on more than one place, example ob1 on place1 and place3.
    And changes to ob1 be reflected in both places.
    This is more for output-only objects i.e. view-olny widgets like labels, graphicviews, etc.

    Which classes should I use?
    Is there an example?
    Thanks a lot.

Log in to reply