Split view of QTextEdit or QTabWidget
-
Hi everyone,
I was wondering how splitting view is done.
For example, in QtCreator, we can split the view horizontally or vertically and we can also split within an already splitted view.
Since I'm developing an editor myself, I wanted to add this feature.For now, I have a QTabWidget with a bunch of QTextEdit* .
I just need some pointers/ideas, not necessarily a complete solution.
Thanks a lot
-
hi
First step could be to split the tab in 2
you can use
http://doc.qt.io/qt-5/qsplitter.html#detailsIf you want to allow splitting of already split "tabs" then it will become complicated.
So since you already used tabs what is the design goal?
-
Hi, thanks for answering.
Let's say you have 3 documents opened in the QTabWidget : DocA, DocB, DocC. I want to be able to split view, let's say vertically, so I can either have DocA and DocB simultaneously on screen, or even better, DocA twice at different cursor location.
I'm gonna look further into the link you gave me. Thanks
-
Hi,
In that case, you should take a look at Qt Creator's sources for inspiration.