void QStyle::drawComplexControl

void QStyle::drawComplexControl(ComplexControl control, const QStyleOptionComplex * option, QPainter * painter, const QWidget * widget = 0) const [pure virtual]


Draws the given control using the provided painter with the style options specified by option.
通过使用提供的painter来画出option的选项风格给定control。



The widget argument is optional and can be used as aid in drawing the control.

widget 参数是可选的并且可用于协助画control。


The option parameter is a pointer to a QStyleOptionComplex object that can be cast to the correct subclass using the qstyleoption_cast() function. 

option参数是一个可通过使用qstyleoption_cast() 函数,被转换成所修改子类QStyleOptionComplex 类型的指针。


Note that the rect member of the specified option must be in logical coordinates.

注释:拥有特定option的rect成员必须必须是在合理坐标内。



Reimplementations of this function should use visualRect() to change the logical coordinates into screen coordinates before calling the drawPrimitive() or drawControl() function.

重载函数在调用drawPrimitive() 或者 drawControl() 之前,需要使用visualRect() 改变成合理的坐标。


The table below is listing the complex control elements and their associated style option subclass. 

下标列出了complex control 要素和它们相关的风格选项。


The style options contain all the parameters required to draw the controls, including QStyleOption::state which holds the style flags that are used when drawing. 

风格选项包含了所有画control参数的请求,当它们被绘制时要保持QStyleOption::statestyle flags。


The table also describes which flags that are set when casting the given option to the appropriate subclass.

这个表格同时也描述了如何给子类设置合适的flags参数。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值