12-29-2013, 03:56 AM | #1 |
frumious Bandersnatch
Posts: 7,516
Karma: 19000001
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 |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[GUI Plugin] KindleUnpack - The Plugin | DiapDealer | Plugins | 494 | 05-18-2024 02:34 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 |