• 8566阅读
  • 7回复

函数求解paint(QPainter *painter,const QStyleOptionGraphicsItem *option, QWidget *widget) [复制链接]

上一主题 下一主题
离线luoge2010
 

只看楼主 倒序阅读 楼主  发表于: 2011-03-18
图元项的该函数第二个参数option->levelOfDetail这个字段 为什么无论怎么缩放它的值仍然为1呢  求大侠解答!
离线dbzhang800

只看该作者 1楼 发表于: 2011-03-18
levelOfDetail ?
存在这个东东?那个版本的Qt?
离线luoge2010

只看该作者 2楼 发表于: 2011-03-18
QT 4啊 好像4.2就有了把 QStyleOptionGraphicsItem这个类的一个成员
离线wxj120bw

只看该作者 3楼 发表于: 2011-03-18
能多贴些代码吗 好分析
离线logens
只看该作者 4楼 发表于: 2012-10-16
顶起来
心随我意,我心翱翔
离线ggkuroky
只看该作者 5楼 发表于: 2012-10-21
By default, if no transformations are applied, its value is 1. If zoomed out 1:2, the level of detail will be 0.5, and if zoomed in 2:1, its value is 2.
This function was introduced in Qt 4.6.
也只能帮你这么多了,我的是Qt 4.7.0
相信自己,天道酬勤!
离线ggkuroky
只看该作者 6楼 发表于: 2012-10-21
qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform ( const QTransform & worldTransform ) [static]
Returns the level of detail from the worldTransform.
Its value represents the maximum value of the height and width of a unity rectangle, mapped using the worldTransform of the painter used to draw the item. By default, if no transformations are applied, its value is 1. If zoomed out 1:2, the level of detail will be 0.5, and if zoomed in 2:1, its value is 2.
This function was introduced in Qt 4.6.
相信自己,天道酬勤!
离线ggkuroky
只看该作者 7楼 发表于: 2012-10-21
The option parameter provides style options for the item, such as its state, exposed area and its level-of-detail hints.
相信自己,天道酬勤!
快速回复
限100 字节
 
上一个 下一个