Hello,
In my application which has a MainWindow, I allocate a whole lot of Dialogs and for each of these, I want to have a m_mainwindow pointer of type MainWindow *.
Now when I make a dialog via the wizard add new > Qt > Qt Designer Form class
it creates a constructor for the dialog which takes an argument of type QWidget *, when in fact this QWidget pointer is going to be passed my MainWindow pointer. So I end up defining a method of signature void init(MainWindow *) for each of my dialog. It kind of feels like a waste to have to define an extra method when I have passed the MainWindow (albeit as
a QWidget in the constructor).
I dont like the idea of dynamically recasting the QWidget pointer to a MainWindow pointer in the constructor.
I am wondering about whether it is possible to change or configure the wizard that gets called when I add a new Qt Designer Form Class.
Should I be looking into adding a new Template for the wizard?