PDA

View Full Version : About QLineEdit



vijay anandh
19th October 2006, 08:37
Hi

I want to Disable Scroll Bars in QLineEdit, How To Do it. i have set SetMaxLength with value. I should enter the characters length , where QLineEdit control has maximum width and maximum height. Scroll bars should not come when excedding maxlength.

Warm Regards
Vijay

wysota
19th October 2006, 10:22
QLineEdit doesn't have scrollbars. Do you mean QTextEdit? You can disable the scrollbars through set(Horizontal|Vertical)ScrollBarPolicy() methods.

BTW. Try to use more descriptive thread titles next time, please.

jpn
19th October 2006, 10:45
QLineEdit does not even have scroll bars. But are you talking about QTextEdit? If so, try

QAbstractScrollArea::setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff)
QAbstractScrollArea::setVerticalScrollBarPolicy(Qt ::ScrollBarAlwaysOff)


Edit: Oops, I bit late answer..