There are 4 tabs. In each on the list. Depending on the selected list item on the right, the content on the right (forms, buttons) should change.

1) I understand that each application header should have one application window? Each list contains about 10 items. Total 40 items in main.cpp?

2) What is necessary to contain the form? Each item in the 2.5 form list has an average of a total of 100 forms.

3) Is it possible to split each tab by classes or something like that and how will it look like? Can this be implemented on the QtQuick toolkit?

  • Describe in more detail why you need the option to generate new items programmatically and set the required parent for the required list item. Personally, in my application there is a main class (ControlViewWidget), which initiates the main window and loads other widgets into it under certain conditions (with the necessary signals). If necessary, I can attach the source of the test project. - Vyacheslav Savchenko
  • @ VyacheslavSavchenko it would be interesting to see how this is implemented. I do not quite understand how you can save time and do not paint 100 forms. I have some forms the same. Only regular expressions for them should be different. - Awethon

1 answer 1

Well, for some reason my post did not fit the local moderation, I will try to correct it. I will answer your questions in order:

  1. No, the widget will have its window only if you do not ask its parent.

  2. Invalid question, I can not answer. If you mean by the form Qt Designer form class, then as usual in the combination h + cpp + ui.

  3. Each TabWidget tab is a separate QWidget . Answered like the way I understand, if anything correct.

Made a sample application, uploaded to the github https://github.com/fenixrus/MoreWindowApplication

  • Much became clear, thanks. But I’m wondering how to save on the code, for example in the code almost identical to secondwidget and thirdwidget. Has Qt come up with monotonous widgets? - Awethon
  • And what prevents to make one “template form class” both in its methods, or in the constructor, to set the necessary parameters, the necessary output, and such classes can be initialized as much as necessary. - Vyacheslav Savchenko