Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. ComboBox Qml delete an object
Forum Updated to NodeBB v4.3 + New Features

ComboBox Qml delete an object

Scheduled Pinned Locked Moved Solved QML and Qt Quick
6 Posts 3 Posters 2.1k 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
    petitDoigtPuissant
    wrote on last edited by
    #1

    Hello everybody !
    I am working on a Qml program , i added a ComboBox but i want the user to be able to delete an item. I cannot find anything on that in the Qml ComboBox documentation.
    I would like something like remove() in the Qt Widget Combobox.

    So is it possible to do that in Qml ?

    thank you !

    raven-worxR E 2 Replies Last reply
    0
    • P petitDoigtPuissant

      Hello everybody !
      I am working on a Qml program , i added a ComboBox but i want the user to be able to delete an item. I cannot find anything on that in the Qml ComboBox documentation.
      I would like something like remove() in the Qt Widget Combobox.

      So is it possible to do that in Qml ?

      thank you !

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @petitDoigtPuissant
      ComboBox element has a delegate property.
      This lets you easily change the appearance of the items and also add a remove-button or even swipe gesture etc.

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • P Offline
        P Offline
        petitDoigtPuissant
        wrote on last edited by
        #3

        Ok thank you i will check that!

        1 Reply Last reply
        0
        • P petitDoigtPuissant

          Hello everybody !
          I am working on a Qml program , i added a ComboBox but i want the user to be able to delete an item. I cannot find anything on that in the Qml ComboBox documentation.
          I would like something like remove() in the Qt Widget Combobox.

          So is it possible to do that in Qml ?

          thank you !

          E Offline
          E Offline
          Eeli K
          wrote on last edited by
          #4

          @petitDoigtPuissant When items are added to/removed from the model the view (combo box popup list) is updated automatically. Get familiar with the QML Model/View system if you haven't done it already, it's central to QML Quick.

          P 1 Reply Last reply
          0
          • E Eeli K

            @petitDoigtPuissant When items are added to/removed from the model the view (combo box popup list) is updated automatically. Get familiar with the QML Model/View system if you haven't done it already, it's central to QML Quick.

            P Offline
            P Offline
            petitDoigtPuissant
            wrote on last edited by
            #5

            @Eeli-K said in ComboBox Qml delete an object:

            @petitDoigtPuissant When items are added to/removed from the model the view (combo box popup list) is updated automatically. Get familiar with the QML Model/View system if you haven't done it already, it's central to QML Quick.

            Hmm yes but my question was how to remove the items

            1 Reply Last reply
            0
            • P Offline
              P Offline
              petitDoigtPuissant
              wrote on last edited by
              #6

              Ok everything is working ! i used the delegate documentation and this example to figure it out thanks everyone !

              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