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

List:       kde-devel
Subject:    Re: Hiding a KMainWindow
From:       Michael Pyne <pynm0001 () comcast ! net>
Date:       2003-12-02 19:18:28
[Download RAW message or body]

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

On Tuesday 02 December 2003 05:42, Waldo Bastian wrote:
> On Tue December 02 2003 07:23, Michael Pyne wrote:
> > Hi all,
> >
> > Question: Does hiding a KMainWindow destroy (e.g. unmap) the window, or
> > just actually hide it?
>
> It depends whether the window is hidden (with hide()) or closed (with
> close()).
>
> If the window is closed it will also be deleted if the "WDestructiveClose"
> flag is set.
>
> By default KMainWindow has the WDestructiveClose flag set. See also the
> KMainWindow constructors and qt.html#WidgetFlags-enum in the Qt
> documentation.
>
> Cheers,
> Waldo

Well, according to the source (kdelibs/kdeui/ksystemtray.cpp), it looks like 
it's closed.

    if (parentWidget())
    {
        connect(quitAction, SIGNAL(activated()), parentWidget(), 
                    SLOT(close()));
        new KAction(i18n("Minimize"), KShortcut(),
                    this, SLOT( minimizeRestoreAction() ),
                    d->actionCollection, "minimizeRestore");

Setting the KMainWindow to not have the flag didn't really help matters, 
though.  Plus it wouldn't fix the case where the user clicks on the "X" 
button and then restores the application using the system tray.

I'll keep hacking on it, I suppose. *sigh*

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

iD8DBQE/zOWEqjQYp5Omm0oRAsDYAJ41uAhp2V4PmgYYp2MIqmenOHcwcwCgvreA
ABGh+GfVB7igvaDT2HSghtg=
=PgVL
-----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