Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false)

drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false)

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 1.3k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    opengpu2
    wrote on last edited by
    #1

    drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false), setSelectionMode(xxx::SingleSelection).
    in the ListMode, it works fine, howerver, in the IconMode, it seems i can drag the item, and Debug Error, ASSERT failure in QVariant::save: "Invalid type to save"

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you create a minimal compilable examples that shows this ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • O Offline
        O Offline
        opengpu2
        wrote on last edited by opengpu2
        #3

        sorry, no simple demo...just as i descide.
        when i onverrider the drag&drop related func, it become OK, and not crash...

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          What were you dragging that made it crash ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • O Offline
            O Offline
            opengpu2
            wrote on last edited by
            #5

            acctually as i said, i don't allow the ListItem to be dragget....but i don't know why when IconMode it seems can be dragged...

            drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false)

            drag Error when i drag a QListWidgetItem in a QListWidget which i setDragEnabled(false), setAcceptDrops(false), setSelectionMode(xxx::SingleSelection).
            in the ListMode, it works fine, howerver, in the IconMode, it seems i can drag the item, and Debug Error, ASSERT failure in QVariant::save: "Invalid type to save"

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved