is the *ui Creator specific? Can it be avoided?
Hi, as said in other thread I am completely new to Qt and UI programming as well.
I've seen some examples and mostly the widgets are put directly in the window class inherited from QMainWindow.
e.g.: window.lineEdit ...
I played around with the creator and it seems like it uses a additional *ui which points to ui_window and accessing those basic widgets is done by window.ui->lineEdit.
Is this *ui specific to applications created with the Creator? Is this some recent concept change? Can the Creator add the widgets directly in the window?
rgds
kk
Re: is the *ui Creator specific? Can it be avoided?
You can decide which of the three standard approaches Creator takes when autogenerating widget implementation in Designer group of Creator's settings.
Re: is the *ui Creator specific? Can it be avoided?
The use of ui member pointer can be avoided,
but it's the most recommended way to "integrate" the auto-generated (by uic) class into your code, by that i mean:
1) it's easier to understand then multiple inheritance
2) it needs a few lines of code to write for keeping the pointer a private member (separate the UI and the code) and this means that you ensure that the UI can be changed without changing the code using it.