Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. (PyQt5 - macOS Sierra) QTreeWidget dragging doesn't behave properly

(PyQt5 - macOS Sierra) QTreeWidget dragging doesn't behave properly

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 3 Posters 714 Views 1 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.
  • Fulano PerezF Offline
    Fulano PerezF Offline
    Fulano Perez
    wrote on last edited by
    #1

    Hello everyone.

    I have created a very simple Window with a QTreeWidget with dragEnabled enabled and some items using Qt 5 Designer. On Kubuntu, dragging and dropping the items orders them correctly, but when running the same program on macOS Sierra, the item below the dragged item gets removed.

    QTreeWidget dragging video on macOS, and the same on Kubuntu.
    The code looks like this, it's pyuic5 generated code without any modifications.

    How can I modify my program to order dragged items correctly? I'm fairly new to Qt/PyQt5, so please excuse me if I'm missing something.

    Thank you very much for your help!

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VirtualFloat
      wrote on last edited by
      #2

      Just tested your program on windows 10. No issues there.

      1 Reply Last reply
      0
      • DenniD Offline
        DenniD Offline
        Denni
        wrote on last edited by Denni
        #3

        I tested it within Python 3.7 / PyQt5 / Windows 10 -- as well and it works just fine -- what version of Python are you using that seems to be the biggest culprit that I have seen thus far.

        That said I would not rely on the designer personally because then you do not learn how to make it yourself. Sure look at and see what it is doing but frankly it does not adhere to quality programming standards and creates code that is fairly ugly (aka not simple and smart) and thus it appears more complex than necessary.

        Also you will become dependent upon an additional product that really does not make the design process any easier than it is normally. You would be amazed just how easy it is to build a GUI using the standard code and as you do you will understand what each element is doing more clearly and this could spark an ah-ha moment.

        madness... is like gravity, all takes is a little... push -- like from an unsolvable bug

        1 Reply Last reply
        0
        • Fulano PerezF Offline
          Fulano PerezF Offline
          Fulano Perez
          wrote on last edited by Fulano Perez
          #4

          Hello,

          The problem is only present in macOS. I have listed Kubuntu as an example of the program working correctly since it's what I use as my main OS. It's good to know that it works on Windows also. Sorry if I wasn't clear enough.

          Thank you.

          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