I need to make the scrollbar enabled even if the number of lines is less than the height of the QTextEdit, like in below pic
I tried setDocumentMargin()
but it makes margin in all directions (left, right, top, and bottom)
So, is there a way to increase only the bottom margin of the QTextEdit.
If you observe the source code, we see that the function is defined as follows:
So we can do the same through the functions
rootFrame()
andframeFormat()
as I show below:If you just want to make a QTextEdit scrollbar visible, use the following: