Menu

properties as setter/getter methods line in PySide

2016-01-20
2016-01-21
  • Andreas Zieringer

    Hi,

    is it possible to change the properties access to setter/getter methods like in PySide? Actually right now only the getter methods are missing. I would like to write "QString name = lineedit->text()" instead of "QString name = lineedit->text". Is this easily possible? When yes any hints what needs to be changed in the code.

    Regards,

    Andreas

     
  • Florian Link

    Florian Link - 2016-01-20

    Yes, you have to change the order of slot vs property lookup in the PythonQtClassInfo.cpp
    You might need to adjust PythonQtInstanceWrapper get_attr and set_attr, but maybe that even works without changes.

     
  • Andreas Zieringer

    Hi Florian,

    many thanks for the hint. Just changed the lookup order in PythonQtClassInfo::member() and it works fine :-)

    Regards,

    Andreas

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.