[PyQt] Conflict between setuptools & requirements in official PyQt5 docs
damonlynch at gmail.com
Mon Feb 8 17:01:43 GMT 2016
The PyQt5 docs explicitly say not to put the application startup logic in a
function e.g. main():
Whereas setuptools and its entry_points feature requires the startup logic
be in a function.
>From looking through a bunch of projects on github, I see that the great
majority simply ignore the official PyQt5 advice, and have a main() type
function with all their startup logic.
However at least one project takes the approach of deleting PyQt objects
before exit (drawing on an insight offered by Dr. Koval):
app = QtGui.QApplication(sys.argv)
window = DataViz()
# fixed segfaults at exit:
if __name__ == '__main__':
Is this approach guaranteed to work as well as the approach specified in
the official docs?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt