Important: Please read the Qt Code of Conduct -

Multi-Window application logic

  • Hi,
    i'm of new on Qt and i'm working on an multi-window application for embedded target (Rpi and µC).

    The app is composed of a main Window with three pushButtons that allows to open three other windows : flash, test, calibration as shown on the schema.

    I have also a class "SlaveInstance" that have to be able to communicate informations with the three windows.
    I'm looking for advices concerning the best coding logic to implement such an app, with the relations between the differents windows, and where to declare the slaveInstance class.

    It's more about a discussion and every idea is welcome.
    Thank's a lot !

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    What is slave instance ?

    In any case, for the widget switching, you can take a look at QStackedWidget.

  • Thank's for your time.

    A slave Instance is a class where the data of the slave instance are regrouped. For exemple the slave ID, the register address of error or voltage state, or the voltage value that has been measured. The three others windows have to be able to modify or read data of the slave instance by accessors and mutators member functions of the slave instance class.

    For now, all of the windows are QWidgets and are shown or closed on the clicked signal of the corresponding pushbutton. I don't know if this method is a good practice and i will take a look on QStackedWidget !

  • Lifetime Qt Champion

    In that case maybe a QTabWidget would also be of interest.

    Then you should have one instance of your controller and use signals and slots with these widgets.

Log in to reply