QTextImageFormat Class Reference

[QtGui module]

The QTextImageFormat class provides formatting information for images in a QTextDocument. More…

继承QTextCharFormat

Methods

  • __init__ (self)
  • __init__ (self, QTextImageFormat)
  • float height (self)
  • bool isValid (self)
  • QString name (self)
  • setHeight (self, float aheight)
  • setName (self, QString aname)
  • setWidth (self, float awidth)
  • float width (self)

Detailed Description

该QTextImageFormat类提供的格式设置信息的图像QTextDocument

内嵌图像是由一个对象替换字符( 0xFFFC以Unicode ),其中有一个相关的QTextImageFormat表示。图像格式指定一个名字setName() ,用于定位该图像。使用指定的矩形的大小,图像将被佔用setWidth()和setHeight( ) 。

图像可以在为其Qt的图像读取任何格式提供的,因此SVG图形可以包括一起PNG,TIFF等位图格式。


Method Documentation

  1. QTextImageFormat.__init__ (self)

创建一个新的图像格式的对象。

  1. QTextImageFormat.__init__ (self, QTextImageFormat)
  1. float QTextImageFormat.height (self)

返回由图像所佔据的矩形的高度。

See also width()和setHeight( ) 。

  1. bool QTextImageFormat.isValid (self)

返回True如果图像格式是有效的,否则返回False 。

  1. QString QTextImageFormat.name (self)

返回图像的名称。这个名字是指在应用程序的资源文件中的条目。

See also setName( ) 。

  1. QTextImageFormat.setHeight (self, float aheight)

设置height由图像所佔据的矩形。

See also height()和setWidth( ) 。

  1. QTextImageFormat.setName (self, QString aname)

设置name的图像。该name用来定位图像中的应用程序的资源。

See also name( ) 。

  1. QTextImageFormat.setWidth (self, float awidth)

设置width由图像所佔据的矩形。

See also width()和setHeight( ) 。

  1. float QTextImageFormat.width (self)

返回由图像所佔据的矩形的宽度。

See also height()和setWidth( ) 。