Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在paintEvent绘图方法之外获取QPainter的字体度量?在屏幕上绘画之前我需要这个。
如果您需要在绘制事件之外进行文本布局,只需从您将使用的字体创建一个 QFontMetrics。