mirror of
https://github.com/Lurkki14/tuxclocker.git
synced 2025-02-25 18:55:24 -06:00
qt: add ReadableTreeView
This commit is contained in:
parent
787dae669c
commit
587475e81b
20
src/modules/interface/qt/widgets/ReadableTreeView.h
Normal file
20
src/modules/interface/qt/widgets/ReadableTreeView.h
Normal file
@ -0,0 +1,20 @@
|
||||
#pragma once
|
||||
|
||||
#include <QTreeView>
|
||||
|
||||
// Enables the tree view to send a signal when item dragging starts
|
||||
|
||||
class ReadableTreeView : public QTreeView {
|
||||
public:
|
||||
ReadableTreeView(QWidget *parent = nullptr) : QTreeView(parent) {}
|
||||
signals:
|
||||
void itemDragStarted();
|
||||
protected:
|
||||
void startDrag(Qt::DropActions acts) {
|
||||
emit itemDragStarted();
|
||||
|
||||
QAbstractItemView::startDrag(acts);
|
||||
}
|
||||
private:
|
||||
Q_OBJECT
|
||||
};
|
Loading…
Reference in New Issue
Block a user