简体   繁体   中英

Qt: setting QLabel coordinates inside Widget

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?

PS At the moment the scheme is a QWidget and I use QPainter to draw rectangles

知道矩形在QPainter中的位置,如果只想在其中书写,则可以使用QPainter :: drawText函数。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM