Qt World Summit: Submit your Presentation

(SOLVED) QStackedWidgets and navigations when there are multiple levels of objects.

  • Dear Qt-Magicians

    I'm creating a Gui, using QStackedWidgets to manage the widgets.

    There are 3 levels:

    • QMainWindow
    • QWidgets representing overviews: Clients, Products and Invoices
    • QWidgets representing specific identity: Client, Product and Invoice (created by the resp. overview)

    But... there's something I want to do.

    I have a toolbar with 3 fixed actions: "Clients", "Products" and "Invoices". Connected to the overview-widgets.
    then there's a separator.

    Now, i'd like to add actions to the toolbar when a specific identity has been created. So the user can navigate between the widgets.
    And as an extra, each specific identity representing a specific id, can only be opened once.

    How to start with this?

    • Can i pass a pointer to the toolbar?
    • Can i keep creating actions?
    • How do I delete it when the specific identity is closed?
    • Is this 'Clean code', or can you suggest better techniques?

    Something tells me this is not a clean way to set up a GUI.
    An MDI however also sets me up with passing a pointer, and when one is maximized there's also no clear overview of what is opened.

  • I've decided to work with QTabWidgets. This question can be ignored

Log in to reply