关于QGraphicsView设置背景颜色,有很多中方法,
1.设置view或者scene的画刷 setBackgroundBrush(),但是这里有个比较坑的是,仅仅设置画刷并不能改变背景颜色还要重写受保护的函数drawBackground()
-
设置调色板好像无效(好像qt5 button 和 view 设置调色板都不好使)
-
fontPaintGraphicsView->setStyleSheet(“background-color: rgb(255, 0, 0);”);目前来说是有效的
-
scene不是widget,所以不能设置setStyleSheet
4729

被折叠的 条评论
为什么被折叠?



