-
Bug
-
Resolution: Done
-
P1: Critical
-
4.8.0
-
None
-
49409f612c47f30434aa809e4d2c963f1a6bb88a
Run the following application with Qt 4.7.x and then Qt 4.8:
#include <QtGui>
class MyWidget: public QWidget
{
public:
MyWidget(QWidget *parent = 0) : QWidget(parent) {}
void paintEvent(QPaintEvent *)
{
QPainter p(this);
QPen pen(Qt::black);
pen.setCapStyle(Qt::FlatCap);
p.setPen(pen);
int y = rect().center().y();
p.drawLine(QPointF(0, y), QPointF(width(), y));
}
};
int main(int argc, char **argv)
{
QApplication app(argc, argv);
MyWidget w;
w.resize(100, 100);
w.show();
return app.exec();
}
The pixel at 0, y will not be covered with Qt 4.8. This breaks underlines in text, which uses flat caps.
See screenshot for comparison.
- resulted from
-
QTBUG-18898 Underlines for shortcuts in menu bar at wrong location
-
- Closed
-