-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
对话框偶尔报错 QPainter::begin #867
Labels
bug
Something isn't working
Comments
同样遇到问题,测试发现如果对话框中包含有滚动条的组件(包括 最小复现代码class CustomMessageBox(MessageBoxBase):
def __init__(self, parent=None):
super().__init__(parent=parent)
self.scrollArea = ScrollArea()
self.scrollWidget = QWidget()
# 让 widget 比 scrollArea 更高,以显示纵向滚动条
self.scrollWidget.setFixedHeight(300)
self.scrollArea.setFixedHeight(200)
# 如果没有滚动条显示就不会报错:
# self.scrollWidget.setFixedHeight(150)
# self.scrollArea.setFixedHeight(200)
self.scrollArea.setWidget(self.scrollWidget)
self.viewLayout.addWidget(self.scrollArea) 报错信息在关闭对话框后,控制台输出报错信息: QPainter::begin: A paint device can only be painted by one painter at a time.
QPainter::translate: Painter not active 环境信息
|
可能得取消滚动条的透明特效 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: