Spontaneously, I’d adjust the old-style signal connection with the new-style method of connecting, maybe that will make things a little more clear what’s going on.
self.uiMainWindow.uiUnitExtensionTable.itemChanged.connect(self.testPrint) Wasn’t sure about how to convert the other arguments, but this self.uiMainWindow.uiUnitExtensionTable.itemChanged is a signal that you are attempting to call directly, and is why you’re getting the error. If you’re looking to emit the arguments with it, you’ll need to pass them to .emit() instead. self.uiMainWindow.uiUnitExtensionTable.itemChanged.emit(self.uiMainWindow.uiUnitExtensionTable.currentItem) See here about old-style versus new-style. - http://pyqt.sourceforge.net/Docs/PyQt4/new_style_signals_slots.html On 14 April 2015 at 01:39, Benjam901 <[email protected]> wrote: > Hello all, > > I am having a bit of trouble with my QTableWidget. When you double click > and edit a text field inside the QTableWidget I need a signal to be emitted > when enter is pressed/when the data in the table has actually changed. > > My test case is self.uiMainWindow.uiExtensionTable > > I have tried testcase.cellChanged, testcase.dataChanged and also something > like this: > > self.connect(self.uiMainWindow.uiUnitExtensionTable, QtCore.SIGNAL(self > .uiMainWindow.uiUnitExtensionTable.itemChanged(self.uiMainWindow.uiUnitExtensionTable.currentItem)), > self.testPrint) # Gives me native Qt signal is not callable Error > > But I have have had no luck so far > > cellChanged seems to be the closest I have gotten so far but it activates > when I double click the item rather than when I have finished editing the > text field. > > Any help would be much appreciated :) > > Cheers, > > Ben > > -- > You received this message because you are subscribed to the Google Groups > "Python Programming for Autodesk Maya" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/python_inside_maya/e92615c3-c92f-464b-acde-487d50976d10%40googlegroups.com > <https://groups.google.com/d/msgid/python_inside_maya/e92615c3-c92f-464b-acde-487d50976d10%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- *Marcus Ottosson* [email protected] -- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmODTWiZV%3D8EEcpPmaRwQcaSnqsFrRGYrgg_yen%2Bn%3DM853A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
