[Qt-creator] Editor window line spanning full length - background color changes

Kobus Jaroslaw Jaroslaw.Kobus at digia.com
Thu Nov 7 11:59:59 CET 2013


Hi,

Try setting the following property to the text format:

format.setProperty(QTextFormat::FullWidthSelection, true);

Pass your text format to QTextEdit::ExtraSelection, and pass a cursor containing your selection, too.

Pass a list of QTextEdit::ExtraSelection to:

void QPlatinTextEdit::setExtraSelections();

Regards

Jarek


-------- Original-Nachricht --------
Betreff:        [Qt-creator] Editor window line spanning full length - background color changes
Datum:  Thu, 7 Nov 2013 02:37:39 +0700
Von:    "C. Bergström" <cbergstrom at pathscale.com><mailto:cbergstrom at pathscale.com>
An:     qt-creator at qt-project.org<mailto:qt-creator at qt-project.org> <qt-creator at qt-project.org><mailto:qt-creator at qt-project.org>



Hi

We're working on some changes to the editor window and hit a small bump.
It's cosmetic, but annoying (to me).
-------------
In the attached image you can see we can change the background color for
certain pieces of code. Now it only spans the length of the text.
Ideally I'd like it to span the full length of the line though.
Possible? If so how do we do it.

Thanks

./C




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20131107/e2231543/attachment.html>


More information about the Qt-creator mailing list