Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.1.0
-
None
-
-
7451fb36fd1de38868c6c9a48da0b1b66a771672 (qt/qtbase/dev) 3cbb190c5586001756fe69637db0e584575d279f (qt/tqtc-qtbase/5.15)
Description
Consider the following example code:
#include <QApplication> #include <QHBoxLayout> #include <QLineEdit> #include <QPlainTextEdit> #include <QTextEdit> #include <QWidget> int main(int argc, char **argv) { QApplication app(argc, argv); QWidget container; QHBoxLayout hbl(&container); QPlainTextEdit pte; hbl.addWidget(&pte); pte.setFixedHeight(QLineEdit().sizeHint().height()); pte.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); pte.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); pte.setWordWrapMode(QTextOption::NoWrap); pte.setTabChangesFocus(true); QTextEdit te; hbl.addWidget(&te); te.setFixedHeight(QLineEdit().sizeHint().height()); te.setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); te.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); te.setWordWrapMode(QTextOption::NoWrap); te.setTabChangesFocus(true); container.show(); return app.exec(); }
When the cursor reaches the right margin of the QPlainTextEdit it is sometimes initially drawn but vanishes when blinking should happen. The QTextEdit does not show that defect.
Sometimes it is necessary to delete the last characters and type one ore two more to trigger the problem.