Results 1 to 15 of 15

Thread: Stupid list widget won't clear

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2007
    Posts
    29
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy Stupid list widget won't clear

    When I say MyListWidget->clear() it crashes if there's an item selected (if it's fresh and an item hasn't been clicked yet it works).

    When I create a command that goes MyListWidget->takeItem(0) it removes the top item (like it should) and then when there's one item left it crashes when it tries to remove it.

    If I don't select anything in the listwidget at all during the course of the program, the command is able to remove the last item safely.

    What's going on here? I think clear() worked in my program a short time ago, and now it seems to have this strange issue. How do I fix this issue and make the listwidget clearable?
    Last edited by scwizard; 24th March 2007 at 21:11.

Similar Threads

  1. Replies: 8
    Last Post: 1st October 2015, 07:23
  2. Controlling which widget on top layer?
    By JonathanForQT4 in forum Qt Programming
    Replies: 6
    Last Post: 22nd March 2007, 14:27
  3. Replies: 4
    Last Post: 10th March 2007, 18:01
  4. Custom widget in list view
    By fusoin23 in forum Qt Programming
    Replies: 1
    Last Post: 18th November 2006, 14:09
  5. [Qt 4.1.0] Split a widget on demand
    By Townk in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2006, 14:16

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.