Mailinglist Archive: opensuse-programming (98 mails)

< Previous Next >
Re: [suse-programming-e] KDevelop. Opinions? Experience?
  • From: "Steven T. Hatton" <hattons@xxxxxxxxxxxxxxxxxx>
  • Date: Fri, 27 Feb 2004 12:36:24 -0500
  • Message-id: <200402271236.38945.hattons@xxxxxxxxxxxxxxxxxx>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 27 February 2004 11:16 am, Martijn Houtman wrote:
> On 26-feb-04, at 18:48, dries wrote:
> > That's why i (still) allways use the 'KDE-mini' type of application,
> > this is
> > because i wan't some gui stuff done in a simple manner.
>
> Same here. I don't really like applications to create functionality
> code for me (Wizards, brr). They come out handy, sometimes, but
> especially if you're learning this stuff this is not the way to go.

I don't fully agree with that. The code templates can be very useful for
laying down a foundation to get you started. I found that especially true
with Qt. In Java I also gained a great deal from JBuilder's code templates
and other supporting features. I is simply easier to look through a list of
available methods displayed at the edit cursor than it is to go back and
forth between a reference document and you work.

A disadvantage to that approach is that it can keep you from learning how to
construct classes on your own. But the advantages far outway the
disadvantages. Often I never incorporate the code generated by the IDE into
my project, I simply use it as an example of how to create a particular class
or framework.

> Yeah, I've started learning KDevelop/Qt myself (busy working on a
> project), and found the way this is done in KDevelop kind of weird. All
> of the tutorials indeed tell you to extends the GUI class, and put your
> code in that class.
> However, when you come to think of it, this creates some clean code
> where functionality and layout are neatly separated from each other. No
> need to code the GUI side (which can be boring), just create a .ui in
> Qt Designer and let "Automake & friends" create the .cpp file that
> belongs to it. Need to make a change? Open the .ui, edit it, save, and
> your app has a new GUI (after recompile). If you think of it, this
> really makes sense.

That works as long as the you aren't trying to do anything too fancy, like
dynamic generation of widgets. They you're back to coding the GUI by hand,
at least in part. I think TrollTech should really study what Mozilla does
with XUL. I know the Trolls have their approach to dynamic UI, and I really
need to study that more.

> > 2) How can i change the complete gui in a window by clicking a button
> > of the
> > current gui in that window ? (functionality i want for some reason
> > (don't ask
> > me why)).
>
> I remember from my Java experience that these kinds of things are done
> by LayoutManagers, and for your case specifically the CardLayout. You
> add layouts as if they were cards on a staple, and then switch between
> them by calling some method. Here's an url:
> http://docs.jcu.edu.au/qt/customlayout.html
> This does not seem to be the "qt-way" to do layouts, though. Hope it
> helps.

I don't know how close this gets to that, but it changes the display of
another frame with the click of a button. It's probably possible to put the
same button inside the widget being swapped out.

file:/usr/lib/qt3/doc/examples/demo/demo

I haven't explored it, but the whole body of code is there. I can also
recommend _C++ GUI Programming with QT_
http://www.trolltech.com/developer/books.html

It takes you through some real world code. For example they create a basic
functional spreadsheed with MDI, load and save, and many other features.
- -
> tinus.

STH
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQFAP4AkwX61+IL0QsMRAjrnAJ9PlPMdJlgjfCtN93zg3I+VoBgy2wCg26Ga
/s6589f0tnAZzGinbKuNAbM=
=JZQj
-----END PGP SIGNATURE-----

< Previous Next >