A
A
Alexander2020-09-28 14:35:29
Qt
Alexander, 2020-09-28 14:35:29

What is in an inherited constructor call?

I have a constructor call
MyWindow :: MyWindow(QWidget *parent) : QDialog(parent), ui(new UI:MyWindow)
{//constructor body}
Question: What is ui(new UI:MyWindow)?
ui is an object of type MyWindow, which is declared in the MyWindow class itself. (What surprised me)
UI is a namespace.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Zhilin, 2020-09-28
@Shemapp

MyWindow- this is your controller, which you wrote with your own hands. It asks you to use a code-generated view UI::MyWindow(another class!) that Qt wrote for you following the directions from QtDesigner's `.ui` file. How exactly to use? UI::MyWindowstored in MyWindowin the field ui.

I
Ighor July, 2020-09-28
@IGHOR

This is the widget that is used in the form .ui

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question