Results 1 to 6 of 6

Thread: QListWidget help please

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    667
    Thanks
    10
    Thanked 80 Times in 74 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default QListWidget help please

    Hi All,

    In my application I have a reimplemented QListWidget and constructor looks something like this

    Qt Code:
    1. setSelectionMode(QAbstractItemView::ExtendedSelection);
    2. setAcceptDrops(true);
    3. setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    To copy to clipboard, switch view to plain text mode 

    In this widget user can selected multiple items and then drag them into another widget which reads info of all the items that are being dropped. QListWidget is behaving strange.

    Let us assume that there are 20 items in the widget. Let us call them Item1, Item2....Item20.

    Here are the steps that are performed.

    STEP 1: User Selects multiple items using mouse (Press, drag to select and then Release). Around 10 items are selected. Lets say Item1 to Item10 are selected. (Image1)

    STEP 2: User presses (not click) the mouse on the Item10 in order to drag all the selected items. Only Item10 is selected and only Item10 can be dragged. This is not the desired behavior, therefore user releases the mouse button. (Image2)

    STEP 3: Now, user presses the mouse on Item1. This time all the items that were selected in STEP1 (item1 to item 10) are selected. Dragging items happens as accepted and the items are dropped at the drop site perfectly. (Image3)

    Any ideas on why is this happening ?

    Thanks a lot.
    Attached Images Attached Images

Similar Threads

  1. Get Visible Items from the QListWidget
    By srj in forum Qt Programming
    Replies: 4
    Last Post: 22nd November 2006, 20:13
  2. Qt 4.2: QListWidget changes size of its items
    By KingFish in forum Qt Programming
    Replies: 2
    Last Post: 25th October 2006, 11:06
  3. QTreeWidget & QListWidget different selection
    By munna in forum Qt Programming
    Replies: 9
    Last Post: 21st July 2006, 06:50
  4. keypress while editing an item in QListWidget
    By Beluvius in forum Qt Programming
    Replies: 3
    Last Post: 4th April 2006, 09:56
  5. QListWidget add QListWidgetItem
    By fellobo in forum Qt Programming
    Replies: 3
    Last Post: 20th February 2006, 19:37

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.