IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QText2DEntity Class

QText2DEntity allows creation of a 2D text in 3D space.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QText2DEntity Class

  • Header: Qt3DExtras/QText2DEntity

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS 3dextras)

    target_link_libraries(mytarget PRIVATE Qt6::3dextras)

  • qmake: QT += 3dextras

  • Inherited By:

  • Instantiated By: qml-qt3d-extras-text2dentity.xml

  • Inherits: Qt3DCore::QEntity

Detailed Description

The QText2DEntity renders text as triangles in the XY plane. The geometry will be fitted in the rectangle of specified width and height. If the resulting geometry is wider than the specified width, the remainder will be rendered on the new line.

The entity can be positionned in the scene by adding a transform component.

QText2DEntity will create geometry based on the shape of the glyphs and a solid material using the specified color.

Property Documentation

 

color : QColor

Holds the color for the text item that is displayed in the Qt Quick scene.

Access functions:

  • color() const

  • void setColor(const &color)

Notifier signal:

  • void colorChanged(const &color)

font : QFont

Holds the font for the text item that is displayed in the Qt Quick scene.

Access functions:

  • font() const

  • void setFont(const &font)

Notifier signal:

  • void fontChanged(const &font)

height : float

Returns the height of the text item that is displayed in the Qt Quick scene.

Access functions:

  • float height() const

  • void setHeight(float height)

Notifier signal:

  • void heightChanged(float height)

text : QString

Holds the text that is displayed in the Qt Quick scene.

Access functions:

  • text() const

  • void setText(const &text)

Notifier signal:

  • void textChanged(const &text)

width : float

Returns the width of the text item that is displayed in the Qt Quick scene.

Access functions:

  • float width() const

  • void setWidth(float width)

Notifier signal:

  • void widthChanged(float width)

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+