Hi and a Happy New Year!
1. Strictly speaking my question is a straight Python query. In
PySide GUI program it is common to use "app" as the instance of
QApplication. I do that regularly.
The last statement of the script is often
"sys.exit(app.exec_())"
I usually start the loop with simple "app.exec_()", because it
is shorter and seems more meaningful to me.
I have seen simple Python scripts of the structure:
program
import sys
-- some code --
def main()
-- code --
if __name__ == "__main__":
sys.exit(main())
What is the reason for using sys.exit(main()) when simple and
clear main() would do just as well?
2. The Qt Designer produced files have many statements similar
to this: menubar.setObjectName("menubar")
What practical effect has the "setObjectName" ?
I can not see it as the program runs as well with statements
with "setObjectName" removed.
--
Algis
http://akabaila.pcug.org.au
_______________________________________________
PySide mailing list
[email protected]
http://lists.openbossa.org/listinfo/pyside