Categories
Development GitHub

How to alter dropEvent action in treeview without loosing basic drag-n-drop functionality in PyQt5?

I’m using my custom item model (subclassed from QAbstractItemModel) with custom QTreeView. I want to allow internal drag-n-drop movement (MoveAction) and, when modifier key or right mouse button is pressed, pass CopyAction to my model (to dropMimeData) to copy items. However, default implementation of dropEvent() in QTreeView seems (from C code) only capable of passing […]

Categories
CSS CSV Development

Basic problem with initial positioning of QGraphicsView/QGraphicsScene after show() in Qt5

I write some code for visualization of board and I have problem with initialization. I want generate view filled with board from the start to end (is it is shown on 3rd image). I try use many Qt5 methods but without results (I am beginner in Qt5). View looks perfect after first resize. I have […]