c++ - 如何在 QCustomPlot 中隐藏绘图区域?
问题描述
我正在使用QCustomPlot
并且根据复选框的状态,我想隐藏或显示绘图区域(即QCustomPlot
对象)。但是在我的插槽函数中,复选框状态更改了处理程序,当我用or隐藏QCustomPlot
对象时,它会给出以下错误hide()
setVisible(false)
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::setRenderHint: Painter must be active to set rendering hints
void QCPLayer::drawToPaintBuffer() paint buffer returned inactive painter
请注意,隐藏时我不会调用replot()
该对象,那么问题是什么,如何正确隐藏该对象?
解决方案
推荐阅读
- visual-studio - dotnet pack (.NET 5) 在打包 staticwebassets 时为没有扩展名的文件创建额外的文件夹
- php - 在 wordpress 循环中计数
- javascript - 输入一个非常大的整数会导致一个四舍五入的数字节点js
- javascript - 当我尝试存储选择值时 setState 不起作用
- amazon-web-services - AWS SAM CLI:sam deploy with python3.8 Image failed
- c# - 使用 powershell 将多个 nupkg 文件推送到 Github 包?
- html - 按钮不会改变背景颜色,也不会悬停
- android - 预装的 PdfViewerActivity 不适用于 SelfSigned 可信用户证书 Android 11 版本 2
- sql - 从 Teradata 到 Snowflake 的 SQL 转换,格式为 '9(13) V9(2)'
- python - pandas dataframe中float64检测问题中的nan