Results 1 to 2 of 2

Thread: Making an Editable List (Add/Remove) and Adding Values of Items in List?

  1. #1
    Join Date
    Mar 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Making an Editable List (Add/Remove) and Adding Values of Items in List?

    Alright guys, I'm in quite a situation.
    I have a project for school to create an application in C++ that can create and generate shopping dockets/receipts. This includes being able to add the names of the items, the prices, and then finding the total price of the purchase.
    We can use a GUI (for extra marks), or stick to a simple CLI program. Being one of the higher achievers in the class, I decided to dive into the deep end, and downloaded and installed Qt.
    Now, I've created my GUI, and this is essentially what it looks like so far.



    However, nothing at all is functional as of yet (except File > Exit). The receipt preview to the right is simply a label that I've made myself. I have replaced it with a listWidget, as I think a list would be the way to go, but really I have no idea.

    What I would like to do is to be able to type the name and price of an item, and then click Add Item to add it to the list. Remove Item would remove the selected item from the list. The prices of the items would be totaled and output at the bottom of the items.
    Being able to print the receipt would be a nice final touch, but it isn't necessary and will only gain some bonus marks.

    I am basically asking for any help at all, or any pointers (har har) in the right direction.
    I have found this tutorial online, which looks immensely helpful but unfortunately is for a previous version of Qt and is thus outdated:
    http://doc.qt.nokia.com/qq/qq11-stringlistedit.html

    Any help at all is really appreciated. At the moment I'm reading through a lot of documentation and beginner guides to try and grasp the concepts of Qt, but I'm really starting to worry due to the fast-approaching due date.

    Thanks in advance.

  2. #2
    Join Date
    Apr 2011
    Location
    Poland
    Posts
    10
    Thanks
    2
    Thanked 4 Times in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Making an Editable List (Add/Remove) and Adding Values of Items in List?

    I need something similar to this. Have you completed your task??

    I initially thought about http://doc.qt.nokia.com/4.7-snapshot...dressbook.html but I can't make it work with my class...

Similar Threads

  1. Replies: 14
    Last Post: 2nd October 2012, 04:10
  2. Replies: 1
    Last Post: 26th August 2010, 17:58
  3. Replies: 0
    Last Post: 15th April 2010, 08:42
  4. Qt Kinetic: adding items to list
    By Diph in forum Qt Programming
    Replies: 1
    Last Post: 10th November 2009, 09:27
  5. Adding items to a QGraphicsScene's selection list?
    By mooreaa in forum Qt Programming
    Replies: 2
    Last Post: 1st July 2008, 21:01

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.