Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash if no QApplication #1

Open
2 tasks
hanWolf3D opened this issue Jun 14, 2023 · 1 comment
Open
2 tasks

crash if no QApplication #1

hanWolf3D opened this issue Jun 14, 2023 · 1 comment

Comments

@hanWolf3D
Copy link
Contributor

  • add somehting like this
  • test in a non bqt wrapped blender, ensure its the first qt tool we test
def show():
    app = QtWidgets.QApplication.instance()
    
    exec = False
    if not app:
        exec = True
        app = QtWidgets.QApplication()
    
    global window
    window = MainWindow()
    window.show()

    if exec:
        app.exec_()

    return window
@hanWolf3D
Copy link
Contributor Author

we can also add a try except to the menu to catch other errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant