Results 1 to 4 of 4

Thread: remove item from QListWidget

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2007
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Smile remove item from QListWidget

    Hello,
    I am trying to display simple string in QListWidget.
    I want to limit the size of item of QlistWidget.
    It is not possible to remove item. removeItemWidget function does not work.
    Any idea?
    Thanks

    I use following code.

    void SQLTest::UpdateList(QString receivedData)
    {
    ui.debugList->addItem(new QListWidgetItem(receivedData));
    ui.debugList->setCurrentItem(item);

    qDebug() << ui.debugList.count() ;
    if (ui.debugList->count() == 5){
    ui.debugList->removeItemWidget(ui.debugList->item(0));
    qDebug() << ui.debugList->count();
    }
    }
    Last edited by yushinee; 2nd October 2007 at 13:23.

Similar Threads

  1. QListWidget and selecting an item
    By invictus in forum Newbie
    Replies: 4
    Last Post: 19th June 2007, 12:59
  2. Replies: 1
    Last Post: 19th April 2007, 23:23
  3. Replies: 1
    Last Post: 24th August 2006, 12:44
  4. extract item from QListWidget
    By impeteperry in forum Qt Programming
    Replies: 2
    Last Post: 13th May 2006, 20:41
  5. keypress while editing an item in QListWidget
    By Beluvius in forum Qt Programming
    Replies: 3
    Last Post: 4th April 2006, 10:56

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.