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

Can we print fatal Qt messages despite abort()? #450

Open
The-Compiler opened this issue Aug 25, 2022 · 0 comments
Open

Can we print fatal Qt messages despite abort()? #450

The-Compiler opened this issue Aug 25, 2022 · 0 comments

Comments

@The-Compiler
Copy link
Member

As outlined in Troubleshooting — pytest-qt documentation, when Qt calls abort, often the user doesn't have any useful information due to pytest's output capturing.

I can see two ways around this, which might be worth exploring:

  • Disable pytest output capturing while creating a QApplication
  • Use qInstallMessageHandler to set up a custom message handler which prints some messages (fatal ones, at least) to a separate non-captured output stream (like faulthandler support in pytest)

Not sure if (especially the first one) could get too noisy though, Qt might print some unrelated stuff at startup maybe...

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