admin管理员组文章数量:1666728
I want to add QChart to the form. But I can't find it in the Widget Box. So I created it in the code. How can I insert it in QWidget or QFrame or something else?
I want to set area of that widget in QtDesigner.
解决方案
Option 1: Promoted
I suppose you mean inserting a QChartView, because QChartView inherits from QGraphicsView, this would be a good option, for this we do the following:
first add QT += charts in the .pro
place the QGraphicsView to the design.
Right click on the QGraphicsView and select Promote to...
When doing the above, a menu appears, in the menu it should be set in QChartView in Promoted Class Name, and QtCharts in Header file, then press the add button and finally press promote.
Screenshots of some steps:
[3.]
本文标签: 窗体如何使用qchartqtvsQChartView
版权声明:本文标题:qtvs添加qchart,如何使用Qt Designer在窗体中插入QChartView? 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://m.elefans.com/dongtai/1730076416a1221832.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论