[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KDE vs. QT classes: overlaps and choosing
From:       Thomas Baumgart <ipwizard () users ! sourceforge ! net>
Date:       2006-08-26 17:13:43
Message-ID: 200608261913.49066 () net-bembel ! de
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Hi all,

on Saturday 26 August 2006 18:47, Jerry Blanco wrote:

> Hi,
> I'm kinda new to KDE/QT development so I have some questions (simple and
> rookie questions, probably):
>
> In looking to coded for K... apps (like Krecipes), I notice they use a
> 'hybrid' approach, using some K... classes and some QT classes. As far
> as I can see, KDE and QT classes overlap sometimes. The notorious
> example: QApplication vs. KApplication. As far as I discern from the
> documentation, they do the same thing.
>
> I thought of using QT classes all along (using QApplication instead of
> KApplication), just because I want to learn QT and be able to apply it
> in different apps in the future, not necessarily tied to KDE, using QT
> as a replacement of the STL, kinda.  But then I started wondering in
> code and I see a bunch of KDE classes that are really cool (KDebug, for
> example).
>
> So, the questions:
> a) Is it even possible to write a KDE application without using KDE
> classes? Is it advisable? (probably not, right?) Is it a good idea at
> all? b) If you want to use a hybrid approach, how do you decide if
> you're using a KDE or QT class in a specific instance? For example, how
> do you decide between QApplication and KApplication or KPushButton and
> QPushButton? Are they 100% compatible, in general? Does it matter if I
> use the K or Q class?

If you want to write applications that also run w/o KDE: never use the KDE 
classes. If you write a KDE application: always use the KDE version.

The KDE class is a derived version of the Qt class (a superset) with 
additional (KDE) functionality. It's probably what you refer to as 
'overlap'.

Hope that helps.

-- 

Regards

Thomas Baumgart

thb@net-bembel.de               Check the KMyMoney open source
http://www.net-bembel.de/       project at http://kmymoney2.sf.net/

GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
-------------------------------------------------------------
'Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it.' - Brian W. Kernighan
-------------------------------------------------------------

[Attachment #5 (application/pgp-signature)]

>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic