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

List:       kde-devel
Subject:    Re: Newbie question
From:       Michael Pyne <pynm0001 () comcast ! net>
Date:       2004-04-16 0:11:22
Message-ID: 200404152011.32491.pynm0001 () comcast ! net
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 15 April 2004 16:17, Martin Welch wrote:
> Hi,
>
> Basically, I'm trying to find the KMainWindow handlers for creation and
> destruction. In Windows I'd handle WM_CREATE and WM_DESTROY. Is there an
> equivalent in KDE/Qt?

Yes.  It's sounding like you need to subclass KMainWindow.  Your subclass's 
constructor corresponds to WM_CREATE, as will the constructor of any QWidget 
subclasses you make.

While in the constructor, you aren't guaranteed to have your geometry laid 
out, along with other things.  If you need to process something just before 
the window is shown, override polish().

As far as destruction goes, there are several ways of doing it.  Overriding 
the destructor, handling closeEvent(), connecting lastWindowClosed() (from 
KApplication, IIRC), etc.

Your best bet by far is to read the docs on KDE and Qt.  
(http://developer.kde.org/ and http://doc.trolltech.com/latest/).  If you are 
unfamiliar with C++ (sound like it, no offense), you should brush up.  There 
is a good book available online called Thinking in C++ 
(http://www.mindview.net/Books/TICPP/ThinkingInCPP2e.html).

Hope this helps.

Regards,
 - Michael Pyne
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQFAfySyqjQYp5Omm0oRAtlcAKCbvw56zRRAVup4nTI3HSM26Hhm9ACggM9E
TwoEy/7VqKan+Ue4sBfIbVo=
=5sk9
-----END 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