From kde-devel Wed Oct 28 03:51:12 2009 From: Christoph Feck Date: Wed, 28 Oct 2009 03:51:12 +0000 To: kde-devel Subject: Re: Advice on Qt User interface Message-Id: <200910280451.12670.christoph () maxiom ! de> X-MARC-Message: https://marc.info/?l=kde-devel&m=125670961217068 On Tuesday 27 October 2009 22:39:18 Hugo Pereira Da Costa wrote: > use UI files rather than brute force c++, or indiferent ? Using Designer UI files rather than handwritten C++ code has some advantages: + Obviously, this is WYSIWYG "coding", so you aren't surprised later. You can even quickly test with different styles and fonts. + Anyone, even non-coders, can make changes to the layout. Think people from usability. + Generally, "declarative" programming is the way to go, because you can do more with the XML than just converting it to a C++ source file. + One day KDE might use QtUiTools and load some UI files at run time, so be prepared :) Some disadvantages should not stay unmentioned: - It may add some bloat (e.g. code created by Designer currently sets object names for every layout or spacer, even if you never need a name there) - Keeping the .ui file and the accessing .cpp in sync may require some more care because of the multiple files you have to check. > I personally hate Qt designer (for my own reasons) and have been used to > design my UI in brute force c++. Can you please state your "own reasons"? If there is anything wrong with Designer, you can still "hand code" .ui files. Actually, I do this quite often myself, especially when doing small changes. Kate has nice XML syntax highlighting :) Christoph Feck (kdepepo) >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<