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. Moving QTreeWidgetItems between two QTreeWidgets
Forum Updated to NodeBB v4.3 + New Features

Moving QTreeWidgetItems between two QTreeWidgets

Scheduled Pinned Locked Moved Unsolved General and Desktop
26 Posts 7 Posters 5.0k Views 3 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.
  • O Ovidiu_GCO

    @SGaist Honestly, I don't really know... This is my first project using Qt (or even C++ on a more serious project). I am not familiar with it or any other framework, for that matter.

    It is a school project and I am trying to make it work so I can add it to my portofolio hoping that in the future I will become an intern with Qt and C++(and eventually a Junior Software Engineer).

    So, I use it because it is the first widget that seemed to work for me.
    I need to show some details about the drivers from the database and select a few of them to participate in a race.

    I believe I could use also a QTableView(since there are not a lot of details beside the name) with a checkbox on the last column that would tell if the driver is a participant or not, but I am still trying to make it work with QTreeWidgets.

    I am open to suggestions, if you have an idea that would be appropriate to a newbie like me.

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

    @Ovidiu_GCO Do you really need a tree structure? If not you could simply use QListWidget.

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

    O 1 Reply Last reply
    1
    • jsulmJ jsulm

      @Ovidiu_GCO Do you really need a tree structure? If not you could simply use QListWidget.

      O Offline
      O Offline
      Ovidiu_GCO
      wrote on last edited by
      #22

      @jsulm I have to display a driver, his car and some specs for it. I think I will try a QTableView/QTableWidget

      mrjjM 1 Reply Last reply
      0
      • O Ovidiu_GCO

        @jsulm I have to display a driver, his car and some specs for it. I think I will try a QTableView/QTableWidget

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

        @Ovidiu_GCO
        Hi
        Would a driver have more than one car,
        or could the the information be presented as one item ?
        like
        alt text

        O 1 Reply Last reply
        0
        • mrjjM mrjj

          @Ovidiu_GCO
          Hi
          Would a driver have more than one car,
          or could the the information be presented as one item ?
          like
          alt text

          O Offline
          O Offline
          Ovidiu_GCO
          wrote on last edited by
          #24

          @mrjj There could be more entries of the same driver with different cars, yes.

          I will try the QTableWidget approach, but I already stepped in other problems with it. (I will make a new post since they are not connected).

          Thank you all for your time and advices! ;)

          mrjjM jsulmJ 2 Replies Last reply
          0
          • O Ovidiu_GCO

            @mrjj There could be more entries of the same driver with different cars, yes.

            I will try the QTableWidget approach, but I already stepped in other problems with it. (I will make a new post since they are not connected).

            Thank you all for your time and advices! ;)

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

            Hi
            Ok, so it really is a tree/table structure.
            -Driver
            --Car
            stats
            --Car
            Stats

            But i do wonder when you then select a driver, all his cars should
            also be shown in the other list or just one of the cars ? (used for that race)

            I liked this info
            https://wiki.qt.io/How_to_Use_QTableWidget

            when starting using QTableWidget

            1 Reply Last reply
            0
            • O Ovidiu_GCO

              @mrjj There could be more entries of the same driver with different cars, yes.

              I will try the QTableWidget approach, but I already stepped in other problems with it. (I will make a new post since they are not connected).

              Thank you all for your time and advices! ;)

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

              @Ovidiu_GCO As alternative you could use several list widgets:

              1. On the left is a list of drivers
              2. To the right side of the first list you have a second one: when you select a driver you put the cars of that driver into this list
              3. More lists if needed...

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

              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