Important: Please read the Qt Code of Conduct -

[Solved] Drawing Center Text

  • Dear all:

    I am developing a scientific application and I am programming a Graph, due to this I need to be able to draw text center in an specific coordinate. I have the x and y coordinate where I want to center the text but I don't see any function with this two parameters that allow me to center the text.

    All the best

  • What are you using to draw it?
    If you are using a QGraphicsScene etc. I think you must get the bounding box and translate to the correct position yourself.

  • I have solved using the Rectangle methods and find it the size of the label. thanks a lot

Log in to reply