I'm writing a day schedule and got some troubles: I'm drawing a rectangle on the scheme (rect = event) and I need to put label directly inside of the rectangle. Are there any ways to do that?

P.S. At the moment the scheme is a QWidget and I use QPainter to draw rectangles

有帮助吗?

解决方案

knowing the position of the rectangle in QPainter, if you just want to write in it, you can use the QPainter::drawText function.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top