Results 1 to 2 of 2

Thread: Drag and Drop Events on Pixmap Thumbnails attached to Qlabel

  1. #1
    Join Date
    Feb 2016
    Location
    Venice, California
    Posts
    87
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default Drag and Drop Events on Pixmap Thumbnails attached to Qlabel

    I have a set of Labels which have Pixmaps attached to them. These are thumbnails set within a GridLayout.
    I would like to be able to drag around my thumbnails into other layouts as if I'm sorting/arranging them.
    How would I setup a system to do that, when Qlable doesn't have drag/drop features?

    Thanks

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Drag and Drop Events on Pixmap Thumbnails attached to Qlabel

    All widgets can support drag&drop, the respective event handling methods are part of the QWidget API.
    So it is both possible to have a label subclass that is the source as well as the target of such an operation.

    If you mean drag&drop in the sense of manually rearranging display content you might want to look at QGraphicsView instead.

    Cheers,
    _

Similar Threads

  1. Drag'n'Drop pixmap issue
    By azsde in forum Newbie
    Replies: 6
    Last Post: 5th May 2015, 06:53
  2. Getting keyboard events while in a drag and drop state
    By gerrysweeney in forum Qt Programming
    Replies: 5
    Last Post: 10th July 2012, 12:19
  3. Replies: 1
    Last Post: 25th May 2011, 22:20
  4. Creating a Pixmap for drag and drop
    By Cruz in forum Qt Programming
    Replies: 22
    Last Post: 20th January 2009, 15:51
  5. cursor pixmap during drag&drop
    By darksaga in forum Qt Programming
    Replies: 1
    Last Post: 14th November 2007, 16:55

Tags for this Thread

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.