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. is it able to addChild only 1 QTreeWidgetItem to many other QTreeWidgetItem?

is it able to addChild only 1 QTreeWidgetItem to many other QTreeWidgetItem?

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 2 Posters 885 Views
  • 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.
  • O Offline
    O Offline
    opengpu2
    wrote on last edited by
    #1

    is it able to addChild only 1 QTreeWidgetItem to many other QTreeWidgetItem?
    i tried, but only the first parent QTreeWidgetItem have this child QTreeWidgetItem, all the others does not add this child.

    1 Reply Last reply
    0
    • jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      No, because a child widget item can only have one parent (or none if it is the root)

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      O 1 Reply Last reply
      0
      • jsulmJ jsulm

        No, because a child widget item can only have one parent (or none if it is the root)

        O Offline
        O Offline
        opengpu2
        wrote on last edited by
        #3

        @jsulm ok, so is there any tricky solution for my situation?

        jsulmJ 1 Reply Last reply
        0
        • O opengpu2

          @jsulm ok, so is there any tricky solution for my situation?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @opengpu2 What is your situation actually? Why do you want to use same widget item for several tree widgets? I cannot imagine any use cases. "Tricky solutions" are usually a source of troubles, keep it simple.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          O 1 Reply Last reply
          0
          • jsulmJ jsulm

            @opengpu2 What is your situation actually? Why do you want to use same widget item for several tree widgets? I cannot imagine any use cases. "Tricky solutions" are usually a source of troubles, keep it simple.

            O Offline
            O Offline
            opengpu2
            wrote on last edited by
            #5

            @jsulm thank you

            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