PDA

View Full Version : use UI or create widget in source code?



nuliknol
16th August 2016, 19:21
In my app, I am creating all the widgets in the source code (like the AddressBook example in QT Examples) instead of using ui->setupUi() from widgets.ui file created by the QT Designer (like the Markdown editor in QT Examples). I just like it this way because it seems more cleaner to me. Does this make me less professional that those who use the .ui files ? What does the majority of developers use ? Do they use .ui files or write widgets in the .cpp source file directly ?

Lesiok
16th August 2016, 19:47
Most professional would use such a method that in a particular case is better. There is no general answer which is better.

TheComet
16th August 2016, 21:18
As stated, it depends on what you're doing. Using Designer is going to be a lot faster than writing it in code, so you should use it whenever you can.

anda_skoa
17th August 2016, 20:17
There is already a huge thread where people state their respective preferences.

If your approach works for you then that is what you should continue to use.

Cheers,
_