Perhaps you can use the signal textChanged() and in it to chek if QTextEdit::horizontalScrollBar() will return a valid pointer, if not then there is still no a scrollbar so the text is not too large.![]()
Perhaps you can use the signal textChanged() and in it to chek if QTextEdit::horizontalScrollBar() will return a valid pointer, if not then there is still no a scrollbar so the text is not too large.![]()
Dunno for the flags but the pointer you can check very easy
Qt Code:
if (horizontalScrollBar()) // The ponter is valid // some code... else // The pointer is not valid // some other code...To copy to clipboard, switch view to plain text mode
Because the bar is always there, it's just hidden. Check its value range instead or check if the bar isVisible().
giotto (17th January 2008)
this is working solution
Qt Code:
connect(editor->verticalScrollBar(),SIGNAL(rangeChanged(int,int)),this,SLOT(echoNewRange(int,int)));To copy to clipboard, switch view to plain text mode
Bookmarks