[QScintilla] Case in-sensitive autocompletion

Andrei Kopats hlamer at tut.by
Thu Feb 17 07:31:05 GMT 2011


Hello

I use WrapNone line wrapping sltyle, because would like to use 
horizontal scroll bar for long lines. But, I dislike, that horizontal 
scrollbar is always visible, even if I don't need it. (I need it not so 
often, because long lines are prohibited by coding style)
Why don't you use Qt::ScrollBarAsNeeded hor the horizontal scroll bar?


// Called after SCI_SETWRAPMODE and SCI_SETHSCROLLBAR.
void ScintillaQt::ReconfigureScrollBars()
{
     // Hide or show the scrollbars if needed.
     bool hsb = (horizontalScrollBarVisible && wrapState == eWrapNone);

     qsb->setHorizontalScrollBarPolicy(hsb ? Qt::ScrollBarAlwaysOn : 
Qt::ScrollBarAlwaysOff);
     qsb->setVerticalScrollBarPolicy(verticalScrollBarVisible ? 
Qt::ScrollBarAlwaysOn : Qt::ScrollBarAlwaysOff);
}



More information about the QScintilla mailing list