- if(enable && numLines() > 1) {
- // the vertical scrollbar must be enabled/disabled manually;
- // ScrollBarAsNeeded leads to flicker because of the dynamic widget resize
- setHorizontalScrollBarPolicy(Qt::ScrollBarAsNeeded);
- } else {
- setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
- }