Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
(PyQt5 - macOS Sierra) QTreeWidget dragging doesn't behave properly
Fulano Perez last edited by
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.
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!
VirtualFloat last edited by
Just tested your program on windows 10. No issues there.
Denni last edited by Denni
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.
Fulano Perez last edited by Fulano Perez
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.