Qt SetRenderHints问题
我使用 Qt 4.6.3,但遇到问题。
ui.graphicsView->setRenderHints(QPainter::Antialiasing,false);
但有些线条颜色会改变。我能做些什么?请帮我。
我想我无法表达自己。我有很多行。当我使用此代码相同的行颜色变化(行顶部比行底部浅)时,我无法解决这个问题。
I use Qt 4.6.3 and I have a problem.
ui.graphicsView->setRenderHints(QPainter::Antialiasing,false);
but some lines colors changes. what can I do? Please help me.
I think that I cant express myself. I hava a lot of line. When I use this code same line color changes( top of line lighter than bottom of line ) I can t solve this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
QPainter:: 抗锯齿、假值对于获得更好质量的绘画是必要的。
确定你的问题在于当你绘制线条时,无论何时使用画家都必须保存并恢复状态。
当你在Painter中进行更改时,如果不调用save()和restore()方法,它可能会变得不稳定。祝你好运
QPainter:: Antialiasing, false is necessary to achieve a better quality paint.
sure your problem is in when you paint the lines, whenever you use the painter must save and restore the state.
when you make changes in Painter, it could become unstable if not call the methods save() and restore (). good luck