How to call QDialog::exec()

I tried code from my previous post with only replacing window.show() with window.exec(). KLayout 0.26.4 builds with Python 2 and 3 complained about syntax error, probably because of confusion with built-in exec()

Comments

  • Hi,

    In Python, "exec" is a reserved word. The substitute is "exec_" with a trailing underscore.

    Matthias

  • edited April 2020

    Hi, Matthias!

    Thank you for explanations. It may be reasonable to add Python-specific note to documentation if possible.

  • Thanks for mentioning this. The built-in docu says so, but not the web page. Looks like another issue like the duplicate setter documentation.

Sign In or Register to comment.