Qtdesigner connection between MainWindow and multiple Forms

50 views Asked by At

I am new to Qt, and trying to build Gui. I have a simple question but i can't find any answer to it.

My Gui consist of MainWindow and some number of Forms.

Gui should work as follows:

Where is a QListWidget in MainWindow with some records. If user click on record in this list, in MainWindow should pop up Form for that exact record.

Each record has own Form. And all Forms have different number of widgets inside. But all Forms are Qwidget. So if User pick List_item_1 - Form_for_list_item_1 should appear. If User pick List_item_2 - Form_for_list_item_2 should appear. And so on.

"Name" of records is defined, so user can not add to QListWidget record with random name. Only pre-defined records (in this context List_item_1, List_item_2, ... , List_item_n)

After that, if user click on next record - the prev. Form should be replaced by next Form. But i can not understand how to connect MainWindow and FORMS.

MainWindow: MainWindow_brief

Form: Form_template

Expected result: Result

I am using Qt 5.15.2 (2020).

I have tried "signals and slots", but i can't connect them to Form. Simply QtDesigner won't let me choose Form. I have tried "Promote to...", but it didn't work.

0

There are 0 answers