Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTreeWidget resize width similar to in QtCreator

QTreeWidget resize width similar to in QtCreator

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    haney
    wrote on last edited by
    #1

    Hi,

    I have a QTreeWidget and QTextEdit in a QHBoxLayout. I used designer form.ui to do this.
    In the left pane ie on QTreeWidget I show some files and right pane ie QTextEdit I show source code. This app is similar to QtCreator. I want my app also to be moved horizontally with mouse click similar to QtCreator.

    Please share your views. Appreciate your help in this regard.

    Thanks,
    Haney

    1 Reply Last reply
    0
    • H Offline
      H Offline
      haney
      wrote on last edited by
      #2

      I tried the following:

      @
      this->Internals->treeWidget->header()->setStretchLastSection(false);
      this->Internals->treeWidget->header()->setResizeMode(0, QHeaderView::ResizeToContents);

      @

      Doing this, only QTreeWidget header is moving but not actual treewidget. How can I make QTreeWidget, QTextEdit move horizontally like in QtCreator.

      Please share your views.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dbzhang800
        wrote on last edited by
        #3

        Hi,

        Please read the documentation of the class QSplitter.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved