[PyQt] Why doesn't pyqtProperty have a name attribute like pyqtSlot?

Phil Thompson phil at riverbankcomputing.com
Wed Aug 9 18:35:13 BST 2017


On 9 Aug 2017, at 5:28 pm, James Stearns - NOAA Affiliate <james.stearns at noaa.gov> wrote:
> 
> @pyqtSlot has a name attribute that can be used to define a PyQt name following the JavaScript function name convention while allowing the implementing python method's name to follow PEP8. For example:
> 
> @pyqtSlot(name='deleteItem')
> def delete_item(self):
> 
> @pyqtProperty doesn't have a name attribute. There's got to be a reason why it doesn't. I looked in the PyQt archive and didn't see one. 
> 
> Why doesn't @pyqtProperty have a name attribute?

Nobody has ever asked for it. However I'm not sure that giving something two different names just to follow different naming conventions is a good idea.

Phil


More information about the PyQt mailing list