Results 1 to 5 of 5

Thread: delete items from list box

  1. #1
    Join Date
    Jun 2006
    Location
    India
    Posts
    14
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Question delete items from list box

    hi

    i have a list box and two buttons
    one button is "Add" and the second is "Delete"

    i have written code sucessfully for ADD.
    But for deleting (When the delete button is pressed, the selected item should get deleted from the list box) there seems to be some probs

    pl help
    thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: delete items from list box

    What problems do you have exactly?

  3. #3
    Join Date
    Jun 2006
    Location
    India
    Posts
    14
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Windows

    Question Re: delete items from list box

    the console looks like this


    QTAssignment1.cpp(48) : error C2664: 'removeItem' : cannot convert parameter 1 f
    rom 'void' to 'int' Expressions of type void cannot be converted to other types
    NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop.
    NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio\VC98\bin\NMAKE.EXE"' : return code '0x2' Stop.

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: delete items from list box

    Quote Originally Posted by vvbkumar
    QTAssignment1.cpp(48) : error C2664: 'removeItem' : cannot convert parameter 1 from 'void' to 'int' Expressions of type void cannot be converted to other types
    Well... you have an error in QTAssignment1.cpp file on line 48 --- open your favorite editor (i.e. vim ) and fix it.
    Most likely you are trying to obtain a return value from a function that doesn't return anything.

  5. #5
    Join Date
    May 2006
    Location
    Bangalore
    Posts
    23
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: delete items from list box

    vvbKumar,
    Maybe we can help you better if you can show us your piece of code.
    - Shobhit
    The Keyboard Is Mightier Than The Sword!

Similar Threads

  1. When is the best time to delete a QCanvasItem
    By irudkin in forum Qt Programming
    Replies: 12
    Last Post: 8th March 2007, 21:28
  2. Selective highlighting of Items
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 26th May 2006, 12:20
  3. Replies: 3
    Last Post: 10th April 2006, 19:04
  4. Rubberband painting on multiselection in a list view
    By SkripT in forum Qt Programming
    Replies: 10
    Last Post: 19th March 2006, 11:13
  5. [Qt4]: Adding centered items in QListWidget
    By Jojo in forum Qt Programming
    Replies: 4
    Last Post: 16th March 2006, 20:04

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.