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.
我想在 QPlainTextEdit (C++) 中的特定位置放置一行 当这样做时:
QPainter p(viewport()); p.setPen(QColor("red")); p.drawLine( 0, 0, 300, lines.at(i)/5);
该线静态定位在视图上,即使在滚动时也是如此。那当然是因为它在视口上。我想在文本出现的同一视图上绘制它。我怎么做?
提前致谢