You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

vdboor

Trainee

  • "vdboor" is male
  • "vdboor" started this thread

Posts: 76

Location: The Netherlands

Occupation: Student

  • Send private message

1

Friday, August 12th 2005, 10:15pm

Delay shutdown of kde?

When my MSN client clients, it still needs to teardown some connections nicely. This means it needs to wait for some signals (or a timeout) before it actually quits.

Is it possible to implement such behavour?

The first solution I came up with is:
- subclass KApplication::queryClose()
- refuse the close event
- initiate the connection teardown (this involves signals/slots)
- close the application manually.

Unfortunately, such trick would cancel the KDE logout. Is there another way to solve this, so the closing of the application is somehow delayed?
Working on KMess, a MSN Messenger client for Linux/KDE.

This post has been edited 1 times, last edit by "vdboor" (Aug 12th 2005, 10:16pm)


Posts: 2,162

Location: Graz, Austria

Occupation: Student

  • Send private message

2

Friday, August 12th 2005, 11:37pm

You could try closing but not quitting yet and quit when finishing your cleanup.

Cheers,
_
Qt/KDE Developer
Debian User

vdboor

Trainee

  • "vdboor" is male
  • "vdboor" started this thread

Posts: 76

Location: The Netherlands

Occupation: Student

  • Send private message

3

Saturday, August 13th 2005, 12:00am

But how can I "close, not quit"? when close() is called, the application closes almost instantly.
Working on KMess, a MSN Messenger client for Linux/KDE.

Posts: 2,162

Location: Graz, Austria

Occupation: Student

  • Send private message

4

Saturday, August 13th 2005, 12:34pm

Quoted

Originally posted by vdboor
But how can I "close, not quit"? when close() is called, the application closes almost instantly.


I think only if the widget in question is the applicationn's main widget.
If there is not mainWidget, you can close all windows without the application exiting.

Cheers,
_
Qt/KDE Developer
Debian User