Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QGraphicsItem text browser?



  • Hello,

    I've been looking at implementing a QGraphicItem that behaves like a QTextEdit / QTextBrowser.
    My requirement is to have the text auto formatted with scroll bars based on the size of the item.

    I've found the QGraphicsTextItem but I cannot figure out a way to have the scroll bar feature on it.
    Is that even possible without completely re writing the entire thing from scratch?

    At the moment, I'm using a QProxyWidget on my QGraphicsItem and I switch between a QTextBrowser and QTextEdit when needed.
    It feels a bit heavy and unnecessary but that's actually the only way I've found that works as expected.

    Any idea?


Log in to reply