Questions tagged [qgraphicstextitem]

The QGraphicsTextItem class, part of the Qt framework, provides a text item that you can add to a QGraphicsScene to display formatted text.

Documentation can be found here (Qt4) and here (Qt5).

64 questions
0
votes
0 answers

QPainter: Paint device returned engine 0

My program produces runtime warnings when I type text into QGraphicsItems. The items are created like this: QGraphicsTextItem* item = new QGraphicsTextItem(this) item ->setTextInteractionFlags(Qt::TextEditorInteraction); item…
Lishen
  • 1
  • 1
  • 2
0
votes
1 answer

startEditing method for QGraphicsTextItem

In my code I create a QGraphicsTextItem which has the editing flag on. I want to find a way to make it focused in a way that it shows the caret and allows the user to type — just like when the user clicks on it but from code. Is there any way to…
Alicia
  • 1,132
  • 1
  • 14
  • 28
0
votes
1 answer

How to save QGraphicsScene items to a .dxf file

I'm going to write an app in Qt that uses Qt Graphics View Framework. I have a QGraphicsScene with some simple texts in it. I'm going to export the scene to be used in Corel Draw. I think the best option is to save items in a .dxf file. Is there…
s4eed
  • 7,173
  • 9
  • 67
  • 104
-1
votes
1 answer

Avoid QGraphicsItem with children from infinite repainting

I have a QGraphicsItem element (subclassesed from QGraphicsItem) that has as child a QGraphicsTextItem. The problem is that the paint(...) method of the QGraphicsItem is called infinitely. Here is the paint method from my QGraphicsItem element with…
mtb
  • 1,350
  • 16
  • 32
1 2 3 4
5