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. Weird behavior with drag and drop in native mode but not raster
Forum Updated to NodeBB v4.3 + New Features

Weird behavior with drag and drop in native mode but not raster

Scheduled Pinned Locked Moved Unsolved General and Desktop
7 Posts 2 Posters 557 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.
  • J Offline
    J Offline
    jvncomm
    wrote on last edited by aha_1980
    #1

    We have a treewidget class that implements drag and drop and when we use raster mode for the graphics mode of the application, we can see the text of the dragged tree item shown while dragging. When we use native, we see a blank gray rectangle of the size of the label for the dragged tree item. Anyone experience this?

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

      Hi and welcome to devnet,

      Can you show the relevant code ?

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

      J 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi and welcome to devnet,

        Can you show the relevant code ?

        J Offline
        J Offline
        jvncomm
        wrote on last edited by jvncomm
        #3

        The code was working as expected until we moved to 4.8.7 to correct some bugs that we traced down to the trolltech library code. When we upgraded to 4.8.7 the performance slowed significantly in some deployed configurations so we had to add in QApplication:setGraphicsMode to force "native" on those systems. When we added QApplication::setGraphicsMode("native") to the code, the drag and drop functionality worked, but the pixmap associated with the treewidgetitem turned grey. If we forced "raster" the widget's pixmap shows while dragging. I'm not sure I can isolate a meaningful example since the code is large and presentation and business logic is intermingled plus the sourcecode is tightly controlled.

        J 1 Reply Last reply
        0
        • J jvncomm

          The code was working as expected until we moved to 4.8.7 to correct some bugs that we traced down to the trolltech library code. When we upgraded to 4.8.7 the performance slowed significantly in some deployed configurations so we had to add in QApplication:setGraphicsMode to force "native" on those systems. When we added QApplication::setGraphicsMode("native") to the code, the drag and drop functionality worked, but the pixmap associated with the treewidgetitem turned grey. If we forced "raster" the widget's pixmap shows while dragging. I'm not sure I can isolate a meaningful example since the code is large and presentation and business logic is intermingled plus the sourcecode is tightly controlled.

          J Offline
          J Offline
          jvncomm
          wrote on last edited by jvncomm
          #4

          Ok, so I can see this on my macbook or my linux machine at home over "ssh -Y" but it takes a while for the label to show with either setGraphicsMode("raster") or setGraphicsMode("native") but it doesn't show in Xvnc and AIX's native display server. This code has been functioning without a hiccup since 2011.

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

            Which version of Qt did you use before ?

            Depending on that, you might want to consider back porting the fixes you need rather than do a full update.

            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
            • J Offline
              J Offline
              jvncomm
              wrote on last edited by
              #6

              Turns out that for some reason the boilerplate code for the TreeWidget doesn't like to show in the one configuration that we needed. We overrode startDrag and got the pixmap we needed from a QLabel we made into a QDrag and it showed up fine. Kind of wierd. The default behavior shows up fine with X on linux, but VNC and AIX's server doesn't show right.

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

                Not the same protocols so there might be bugs with them.

                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

                • Login

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