Hand Coded GUI Versus Qt Designer GUI

In my experience with Qt Designer and other toolkits/UI-tools:

  • UI tools speed up the work.
  • UI tools make it easier to tweak the layout later.
  • UI tools make it easier/possible for non-programmers to work on the UI design.

Complexity can often be dealt with in a UI tool by breaking the design into multiple UI files. Include small logical groups of components in each file and treat each group as a single widget that is used to build the complete UI. Qt Designer's concept of promoted widgets can help with this.

I haven't found that the scale of the project makes any difference. Your experience may vary.

The files created with UI tools (I guess you could write them by hand if you really wanted to) can often be dynamically loaded at run-time (Qt and GTK+ both provide this feature). This means that you can make layout changes and test them without recompiling.

Ultimately, I think both raw code and UI tools can be effective. It probably depends a lot on the environment, the toolkit/UI-tool, and of course personal preference. I like UI tools because they get me up and running fast and allow easy changes later.


Our experience with Designer started in Qt3.

Qt3

At that point, Designer was useful mainly to generate code that you would then compile into your application. We started using for that purpose but with all generated code, once you edit it, you can no longer go back and regenerate it without losing your edits. We ended up just taking the generated code and doing everything by hand henceforth.

Qt4

Qt4 has improved on Designer significantly. No longer does it only generate code, but you can dynamically load in your Designer files (in xml) and dynamically connect them to the running objects in your program -- no generated code however, you do have to name the items in Designer and stick with the names to not break your code.

My assessment is that it's nowhere near as useful as Interface Builder on Mac OS X, but at this point, I could see using the Designer files directly in a program.

We haven't moved back to Designer since Qt3, but still use it to prototype, and debug layouts.

For your problems:

  1. You could probably get away with using the standard dialogs that Qt offers. QInputDialog or if you subclass QDialog, make sure to use QButtonDialogBox to make sure your buttons have the proper platform-layout.

  2. You could probably do something more limited like xPad with limited Designer functionality.

  3. I wouldn't think you could write something like OpenOffice solely with Designer but maybe that's not the point.

I'd use Designer as another tool, just like your text editor. Once you find the limitations, try a different tool for that new problem. I totally agree with Steve S that one advantage of Designer is that someone else who's not a programmer can do the layout.