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

Diego Iastrubni diegoiast at gmail.com
Sun Nov 10 13:07:42 CET 2013


That raises some questions I always been wondering...

1) does this replace older selections, or appends?
2) is it better/cheaper to maintain a global selections list, and all
functions will modify it, or maintaining a local one each time I want
to modify the "background"?

On Thu, Nov 7, 2013 at 12:59 PM, Kobus Jaroslaw
<Jaroslaw.Kobus at digia.com> wrote:
>
> 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>
> An: qt-creator at qt-project.org <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
>
>
>
>
> _______________________________________________
> Qt-creator mailing list
> Qt-creator at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/qt-creator
>



More information about the Qt-creator mailing list