[Qgis-developer] Re: python plugin and layer properties window

Michael Pfeiffer Michael.Pfeiffer at bd.so.ch
Wed Jun 29 03:57:32 EDT 2011


yes the QMainWindow::destroyed() Signal does work but the problem is it is
only sending the signal when closing QGIS and not when closing the composer
Window.
Here is the code for this:

/beforeList = self.iface.activeComposers()
    comp = self.iface.actionPrintComposer()
    comp.trigger()
    afterList = self.iface.activeComposers()
        
    self.diffList = []
    for item in afterList:
       if not item in  beforeList:
          self.diffList.append(item)

    self.composerView = self.diffList[0]
    composerWindow = self.composerView.composerWindow()
    print self.composerView.composerWindow()

    QObject.connect(composerWindow, SIGNAL("destroyed()"), self.test) 

    def test(self):
       print "it works"
/

So I need a kind of signal which is sent when you close the mapcomposer
window with the x.
I know that composerView must be still present after closing the mapcomposer
window for the composer list.
But where builts QGIS the UI you need for the mapcomposer window?
And how can I get it for listening on the close Event?

regards,

Michael

--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/python-plugin-and-layer-properties-window-tp6383931p6528058.html
Sent from the qgis-developer mailing list archive at Nabble.com.


More information about the Qgis-developer mailing list