[PyQt] still problem with mdi and signal stucked :(

Giorgio Luciano giorgio.luciano at inwind.it
Sat Oct 10 19:00:48 BST 2009


So I've tried to make things simplier but nothing seems to work

I have a mdi area made using the editor and that is the code referred to it
made by pyuic

        self.centralwidget = QtGui.QWidget(MainWindow)
        self.centralwidget.setObjectName("centralwidget")
        self.mdiArea = QtGui.QMdiArea(self.centralwidget)
        self.mdiArea.setMinimumSize(QtCore.QSize(200, 768))
        self.mdiArea.setObjectName("mdiArea")

in the mdi area I put my child called Mdi child calling in the main

     def newTable(self):
        child = self.createMdiChild()
        child.newFile()
        child.show()
        
    def createMdiChild(self):
        child = MdiChild(self)
        self.ui.mdiArea.addSubWindow(child)
        return child

and that's work ... it creates my child in the main.. I also succeed in
implementing the tiling of the windows and so on..

now I want to call a method in the custom table which is inside the child
using the toolbar in the mainwindow... 
 and so I defined a method inside my MdiChild

 def paste(self):
        print("paste")

and I try to call it via the main after defining the active window

def activeMdiChild(self):
        return self.ui.mdiArea.activeSubWindow()
    
    def paste(self):
        self.ui.mdiArea.activeSubWindow.paste()
        
and that doesnt' work at all !!!

I've tried all combinations I continue recevin the error
AttributeError: ' builtin_function_or_method' object has no attribute paste


-- 
View this message in context: http://www.nabble.com/still-problem-with-mdi-and-signal-stucked-%3A%28-tp25836766p25836766.html
Sent from the PyQt mailing list archive at Nabble.com.



More information about the PyQt mailing list