[bt-devel] Eliminate KFontChooser from Configuration Dialog

Gary Holmlund gary.holmlund at gmail.com
Wed Nov 19 19:25:07 MST 2008


Eeli and Martin,

I saw your more recent emails on the subject of Qt Designer, but I
wanted to give you my views of some of the issues that Eeli raised.
I and other members of my project at work have written numerous
complex dialogs and we prefer to use Designer. I will add some
comments below.
>> if I use Qt
>> Designer. It is much easier to design these nested layouts visually and the
>> amount of hand written code is much smaller. It also makes it easy to get
>> re-sizable dialogs. Is there any reason not to use Designer?
>>     
>
> I have found Designer invaluable, but only for fast visual design.
> Eventually I have taken the code from the generated classes and put
> them into files manually. The reasons are:
>       - you can't do everything with Designer anyways
>   
This is true, but the part that it does is often the hardest part to
get right when written by hand. We generally use it for dialogs in
creating the widgets and layout and some issues like tab order
and widget properties. We generally don't use it for connections
and you would want to write your own slot functions.

>       - the class/file structure will be more complicated with Designer
> because you have to subclass
>   
It can be used equally when subclassing or just directly using
QDialog.
>       - you would have to add files to cmake with a special mechanism
>   
It is a standard part of the Qt integration with cmake.
>       - you don't have easy direct access to elements in the manual part
>   
If I understand this comment right, it is only an issue if part of
the dialog is created using Designer and part of it manually. I
would not recommend doing this.
>       - you can't name layouts
>   
You certainly can.
>       - it's hard to mix member and local variables (for example  
> layouts are usually better to create locally, there's no need to  
> access them as object members)
>   
Again, I would not try to mix Designer and manual layouts.
>       - Designer creates much unnecessary, not so clean code
>   
It does add object names to each widget and I normally would
not use these. Most of the other code is reasonable to have.
You don't even need to look at this code. The code you add to
the dialog file would normally be a 1 line function call to the
Designer created code.
>       - if you want to make a small change you may have to redesign the
> whole UI and write the manual part again 
>   
This is mixing Designer and manual layout which I would not
recommend.
> --Eeli Kaikkonen
>   
Gary Holmlund



More information about the bt-devel mailing list