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

  • Qt Champions 2017

    First step could be to split the tab in 2
    you can use

    If 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

  • Lifetime Qt Champion


    In that case, you should take a look at Qt Creator's sources for inspiration.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.