Results 1 to 5 of 5

Thread: editable QListWidgetItem cannot be edited after drag and drop within a QLIstWidget

  1. #1

    Default editable QListWidgetItem cannot be edited after drag and drop within a QLIstWidget

    I insert a editable QListWidgetItem into a QLIstWidget. The item is editable until I drag it. Is it a normal behaviour for QLIstWidget? How to fix that?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: editable QListWidgetItem cannot be edited after drag and drop within a QLIstWidge

    I had similar problem. I used a trick to solve it.
    I catch itemPressed signal of QListWidget, and make the item editable by setting edit role through QTreeWidgetItem::setData

  3. #3

    Default Re: editable QListWidgetItem cannot be edited after drag and drop within a QLIstWidge

    Quote Originally Posted by aamer4yu View Post
    I had similar problem. I used a trick to solve it.
    I catch itemPressed signal of QListWidget, and make the item editable by setting edit role through QTreeWidgetItem::setData
    that's kinda different from what I want. Is it possible to fix that by subclassing the QListWidget and how?

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: editable QListWidgetItem cannot be edited after drag and drop within a QLIstWidge

    that's kinda different from what I want.
    What do you want then ?

  5. #5

    Default Re: editable QListWidgetItem cannot be edited after drag and drop within a QLIstWidge

    Quote Originally Posted by aamer4yu View Post
    What do you want then ?
    keep the original ItemFlags after dnd

Similar Threads

  1. Replies: 1
    Last Post: 22nd October 2009, 00:02
  2. QListWidget Drag and Drop problem
    By winkle99 in forum Qt Programming
    Replies: 0
    Last Post: 20th October 2009, 20:00
  3. QListWidgetItem subclass - Crash program in drag/drop
    By estanisgeyer in forum Qt Programming
    Replies: 1
    Last Post: 17th April 2009, 09:24
  4. QListWidgetItem in Drag n' drop
    By estanisgeyer in forum Qt Programming
    Replies: 4
    Last Post: 3rd April 2009, 14:43
  5. Drag from QTreeWidget and drop in QListWidget
    By WXNSNW in forum Qt Programming
    Replies: 1
    Last Post: 25th August 2008, 00:15

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.