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
    Qt products

    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:

    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
    Thanked 4 Times in 1 Post
    Qt products
    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 but I can't make it work with my class...

Similar Threads

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


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.