Results 1 to 11 of 11

Thread: Shopping list type of program: how to move bought items to the bottom of QTreeWidget?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2010
    Posts
    5
    Thanks
    1
    Qt products
    Qt4
    Platforms
    MacOS X Symbian S60

    Default Shopping list type of program: how to move bought items to the bottom of QTreeWidget?

    Hi!

    I'm a beginner with Qt and programming in general, and I'm having a problem with a shopping list type of program I'm trying to do. I have attached a picture to show a bit of what I'm trying to execute..

    So I have a QTreeWidget, where I add the items, which are QWidgets. I add them with setCellWidget, when the "Add"-button is clicked. It creates a new widget into the QTreeWidget with the information set below it. I have gotten this to work fine, but I have no idea of the solutions, if there are any, to move the objects that have their checkboxes checked to the bottom of the QTreeWidget.

    I assume that I should somehow keep a list of the added items, and their palce in the list. And when the checkbox of an item is clicked, the widget would send a signal that would move the wanted item down and handle the other items and their places accordingly. I don't really have any idea how this could be done, I don't know how new signals and slots are created, even though I have read the documentations and tried to check the examples.

    Thank you very much in advance, maybe I could be of help for some newbie in the future, too !
    Attached Images Attached Images

Similar Threads

  1. Move items up and down in QListWidget
    By araglin in forum Newbie
    Replies: 7
    Last Post: 31st August 2016, 11:05
  2. List all elements of a QTreeWidget from top to bottom
    By ricardosf in forum Qt Programming
    Replies: 2
    Last Post: 12th June 2010, 02:46
  3. getting a file extenstion list from a MIME type
    By roxton in forum Qt Programming
    Replies: 0
    Last Post: 10th April 2009, 18:27
  4. Replies: 1
    Last Post: 22nd November 2008, 06:32
  5. Can't move Items in the scene
    By maverick_pol in forum Qt Programming
    Replies: 2
    Last Post: 16th May 2008, 09:40

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.