Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.4.2
-
None
-
Linux
Description
The following text should be wrapped exactly at 72 characters. The 'f' of the last "of" is character 73, yet it is not wrapped there. Reported in QTCREATORBUG-25491.
If I call setFontFamily({}) it works as expected.
It reproduces on Linux but not on Windows.
#include <QApplication> #include <QDebug> #include <QTextEdit> int main(int argc, char *argv[]) { QApplication app(argc, argv); QTextEdit e; e.setVisible(false); e.setMinimumWidth(1000); e.setFontPointSize(14.0); // e.setFontFamily({}); e.setLineWrapColumnOrWidth(72); e.setLineWrapMode(QTextEdit::FixedColumnWidth); e.setWordWrapMode(QTextOption::WordWrap); e.setPlainText("Since there may be a significant amount of received input frames ahead of the"); QTextCursor cursor(e.document()); cursor.select(QTextCursor::LineUnderCursor); qDebug() << cursor.selectedText(); // Should *not* include "of" e.show(); return app.exec(); }
Attachments
Issue Links
- relates to
-
QTCREATORBUG-25491 Commit message wrapped differently when amending git commit
- Closed