On 09/09/2010 04:42 AM, [email protected] wrote:
> How does one create a 'close_event' procedure for the main application
> when it is loaded from the UI?
>
> I have several q_object implementations, but since they aren't visible
> widgets, they don't seem to get the close signal.
>
> However, the widgets have tasks running which need to be shut down so
> that the application closes cleanly.
>
Each tagged type derived from Q_Object_Director has Finalize subprogram
which is called when C++ is destroyed. In attached example, user's
object created as child of application object instance, thus
automatically destroyed when application object is destroyed. For GUI
application application object is destroyed when there are no opened
windows displayed. So, you can combine this two facts. Does this help you?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.adb
Type: text/x-adasrc
Size: 275 bytes
Desc: not available
URL:
<http://box347.bluehost.com/pipermail/qtada-users_lists.qtada.com/attachments/20100913/576ac890/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my.adb
Type: text/x-adasrc
Size: 745 bytes
Desc: not available
URL:
<http://box347.bluehost.com/pipermail/qtada-users_lists.qtada.com/attachments/20100913/576ac890/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my.ads
Type: text/x-adasrc
Size: 540 bytes
Desc: not available
URL:
<http://box347.bluehost.com/pipermail/qtada-users_lists.qtada.com/attachments/20100913/576ac890/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my.gpr
Type: application/x-wine-extension-gpr
Size: 220 bytes
Desc: not available
URL:
<http://box347.bluehost.com/pipermail/qtada-users_lists.qtada.com/attachments/20100913/576ac890/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: my_moc.gpr
Type: application/x-wine-extension-gpr
Size: 157 bytes
Desc: not available
URL:
<http://box347.bluehost.com/pipermail/qtada-users_lists.qtada.com/attachments/20100913/576ac890/attachment-0004.bin>
_______________________________________________
qtada-users mailing list
[email protected]
http://box347.bluehost.com/mailman/listinfo/qtada-users_lists.qtada.com