Results 1 to 7 of 7

Thread: [Qt6] StartDrag making crash on Qt6

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2013
    Posts
    321
    Thanks
    9
    Thanked 8 Times in 8 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Exclamation [Qt6] StartDrag making crash on Qt6

    Hi!
    I use a custom startDrag to avoid the pixmap which is annoying during the drag.
    All worked good until Qt6, if I remove my custom startDrag everything works good but with the pixmap that I would avoid.
    Here how I do the custom startDrag:
    Qt Code:
    1. void startDrag(Qt::DropActions supportedActions) override
    2. {
    3. QDrag* drag = new QDrag(this);
    4. drag->setMimeData(mimeData(selectedItems()));
    5. drag->exec(supportedActions);
    6. }
    To copy to clipboard, switch view to plain text mode 
    What would be the thing that Qt6 doesn't like with this particular piece of code where the non-override works perfectly fine?
    Would be nice to have an option to disable pixmap on drag and drop for QTreeWidget/QListWidget one day surely for this kind of case when you don't want a pixmap.
    Thanks a lot!
    Last edited by Alundra; 11th December 2020 at 21:32.

Similar Threads

  1. On the way of making an app installable
    By franky in forum Newbie
    Replies: 6
    Last Post: 5th February 2017, 10:14
  2. Replies: 0
    Last Post: 3rd November 2015, 17:58
  3. Crash gracefully? No crash!
    By lni in forum Qt Programming
    Replies: 0
    Last Post: 7th July 2010, 03:59
  4. making new project qt4
    By !Ci in forum Qt Programming
    Replies: 1
    Last Post: 18th June 2009, 13:32
  5. Need help making plugin
    By vieraci in forum Qt Programming
    Replies: 10
    Last Post: 24th September 2007, 13:20

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.