Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Development

Notices

Reply
 
Thread Tools Search this Thread
Old 12-29-2013, 03:56 AM   #1
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Destroying a GUI plugin window

I'm having an issue with a GUI plugin (this one). Every time I open the plugin main window, a new instance of the plugin is created. This may lead to a memory leak, but there's also the problem that I'm connected a selectionChanged signal to some plugin method, and this connection remains even after I have closed the plugin.

So, how can I completely destroy the plugin instance (and all its connections) when the main plugin window is closed (either with the "Cancel" button or with "x" window button)?


EDIT: This seems to do it:

Code:
from PyQt4.Qt import Qt

self.setAttribute(Qt.WA_DeleteOnClose)

Last edited by DoctorOhh; 12-29-2013 at 05:08 AM. Reason: Fixed link to thread
Jellby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[GUI Plugin] KindleUnpack - The Plugin DiapDealer Plugins 492 10-25-2022 08:13 AM
[GUI Plugin] Wordpress frescogamba Plugins 11 04-06-2015 09:09 PM
[GUI Plugin] Annotations (closed) GRiker Plugins 68 06-17-2014 06:11 AM
[GUI Plugin] Marvin XD (closed) GRiker Plugins 141 06-15-2014 05:36 PM
[GUI Plugin] Plugin Updater **Deprecated** kiwidude Plugins 159 06-19-2011 12:27 PM


All times are GMT -4. The time now is 02:08 PM.


MobileRead.com is a privately owned, operated and funded community.