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. QT treeview to display Different Option Panes.
Forum Updated to NodeBB v4.3 + New Features

QT treeview to display Different Option Panes.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 664 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.
  • P Offline
    P Offline
    ProProgrammer.
    wrote on last edited by
    #1

    ![alt text](0_1544347019288_View.PNG image url)

    I have implemented QItemDelegate to display but how do i make nested dropdown from root shadow element to display second level of tree depth. i do have a list of objects to edit using tree view. How to accomplish such a task.

    I see the easiest way to use a listview and second table view to edit.
    Could anybody guide next steps to solve the problem. Is Treeview the last option to consider. Using abstractmodel doesn't let to set up Widgets. I can't understand how to attach Delegates. No example online to Delegate TreeViews.

    1 Reply Last reply
    0
    • Christian EhrlicherC Online
      Christian EhrlicherC Online
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      What's your exact problem? The treeview in your picture can be easily be build with a simple QTreeView + itemmodel without the use for any other widget or the need for an item delegate

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      P 1 Reply Last reply
      0
      • Christian EhrlicherC Christian Ehrlicher

        What's your exact problem? The treeview in your picture can be easily be build with a simple QTreeView + itemmodel without the use for any other widget or the need for an item delegate

        P Offline
        P Offline
        ProProgrammer.
        wrote on last edited by
        #3

        @Christian-Ehrlicher Excuseme, I forgot to mention that to edit child elements i need to use QComboBox and Buttons. on stackoverflow setting up widgets within nested tree objects is wrong.
        I have found a method to set a widget, but i will use many slots to call back instead of MVC. TreeView MVC example project uses only text.

        mrjjM 1 Reply Last reply
        0
        • P ProProgrammer.

          @Christian-Ehrlicher Excuseme, I forgot to mention that to edit child elements i need to use QComboBox and Buttons. on stackoverflow setting up widgets within nested tree objects is wrong.
          I have found a method to set a widget, but i will use many slots to call back instead of MVC. TreeView MVC example project uses only text.

          mrjjM Offline
          mrjjM Offline
          mrjj
          Lifetime Qt Champion
          wrote on last edited by mrjj
          #4

          Hi
          Delegates are handy for such custom edit.
          For combo box see
          https://wiki.qt.io/Combo_Boxes_in_Item_Views
          for a very special one, see
          http://doc.qt.io/qt-5/qtwidgets-itemviews-stardelegate-example.html
          for a button, this could be an example
          https://stackoverflow.com/questions/11777637/adding-button-to-qtableview

          1 Reply Last reply
          1

          • Login

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