[Qt-interest] Would need some comments please
Ross Driedger
ross at earz.ca
Fri Nov 27 19:49:10 CET 2009
On Fri, 27 Nov 2009 12:31:54 -0500, <qt-interest-request at trolltech.com>
wrote:
Hi Kari,
> I am new to QT and quite new to C++ also so this is slow going.
This can be a challenge as c++ in itself is not a simple language to
master. There are 10,000 ways of doing things (instead of the usual 1000
or so), and most of them are not best practices.
> I am
> making Linux-program to Velleman PCSGU260 oscilloscope/Function
> generator.
> If I ever get this program done it will be under GPL 2 and later. So I
> am not after free consulting for a paid job.
> Anyway I would like to hear whether the structure of the user
> interface is stupid or not.
What do you mean? Is the structure of a user interface 'stupid' or are
the Qt UI classes? If you want some general help on UI design, there are
some good references available, but that is well outside the scope of this
list. Qt's UI classes are pretty sensible compared with other widget
libraries. Qt's big selling point is designing UIs in a platform
independant manner. So it is based on its own abstraction. It has
borrowed some other things like layouts from Java.
> My first stab was with single .h and .cpp
> file and that got too big. Now I have divided the program to separate
> classes but I am not sure it is the way it should be.
Yes. Seperate the classes into different files. Generally, this is done
on a class per 2 files basis (many many exceptions). In my case, I put
all the implementation for a class into one .cpp file, and I only include
closely related classes in one file if it makes sense to do so. The files
give you a chance to break up the source code in logical segments.
> So please tell me if I am going of the cliff...
Of course you are: you are programming in c++. :)
> Any comments highly appreciated - you don't have to be nice ... :-)))
> Now I will start studying the QPainter - pointers to examples
> appreciated.
Assistant, the demos and google are your friends. There are also some
good books on the subject available.
Don't try to master it all in one or two session -- unless you are an
incredibly gifted developer, you wont be able to get it all in the first
go.
--
"My music is best understood by children and animals. "
Igor Stravinsky
Ross Driedger
ross_at_earz.ca
More information about the Qt-interest-old
mailing list