I had to create a new class inheriting the QwwRichTextEdit since I needed a few more buttons on the toolBar so I just tried now to reimplement the resizeEvent function.
I changed the toolBar width in the setGeometry command:
tb->setGeometry(0,0,width() - verticalScrollBar()->sizeHint().width(), tb->sizeHint().height());
tb->setGeometry(0,0,width() - verticalScrollBar()->sizeHint().width(), tb->sizeHint().height());
To copy to clipboard, switch view to plain text mode
It works but I would like it better if I could change the scrollBar height.
I've tried adding the line:
verticalScrollBar->setGeometry(0,tb->sizeHint().height(), verticalScrollBar()->sizeHint().width, viewport()->size().height() );
verticalScrollBar->setGeometry(0,tb->sizeHint().height(), verticalScrollBar()->sizeHint().width, viewport()->size().height() );
To copy to clipboard, switch view to plain text mode
This command worked but only after resizing the window. When I view the textEditor for the first time I already have a document displayed and a scrollBar but it's height is not adjusted. I don't know via which command to call the resizeEvent function and from where.
Bookmarks