-
Notifications
You must be signed in to change notification settings - Fork 3
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
How to remove that messages on console #2
Comments
Thanks you. That message indicates that there are unbalanced number of calls to QPainter::save and QPainter::restore. And It doesn't happen to me. Do you use MacOS? Can you show me the code? That might help me figure out how to solve it |
Now it might work, at least another problem you've brought up Can't upload this to pypi as a package right now so you have to personally add code below # to maintain the maximum size intact
def event(self, e):
if int(e.type()) == 76:
self.setMaximumHeight(self.sizeHint().height())
return super().event(e) in the very end of the event() function catches the event 76 stands for LayoutRequest which is one of the QEvent, emit when widget layout needs to be redone. self.setMaximumHeight(self.sizeHint().height()) is set the maximum height to most appropriate one which can get by I will upload to pypi 10~12 hrs later or maybe more than that And.. again i've never seen those messages even in the code you provided. As a matter of fact, i'm also use Windows 11. I wonder which Python version you use..? Mine is Python 3.10 |
Great, the solution worked with my code! Thank you very much. I'm using python 3.11.0, I'm not using a Venv |
Sorry for belated reply. I used Python 3.11.1 and global environment to run that and there was no message problem. Maybe you should upgrade the Python version from 3.11.0 to 3.11.1 but this is just my guessing. Installing the PyQt all over again is another solution of this.
If you are using Oh, by the way, do you still have that problem? If so, is the problem that message keep popping up really or harmful to the application? like, does that slow the app down or make it crash? That'll be huge problem. Frankly i don't know why does that happen in your case. 😔 So only thing i can say is reinstalling the PyQt like anyone can say Thanks |
Testing the pyqt-custom-titlebar-setter
I receive that messages on console when i resize or move the window, how i can remove or stop spamming that messages ?
And thanks, you make a god job with that !!
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
QPainter::restore: Unbalanced save/restore
The text was updated successfully, but these errors were encountered: