mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 00:17:23 -06:00
Use QStyledItemDelegate instead of QItemDelegate
This commit is contained in:
@@ -26,24 +26,23 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#ifndef TRANSFERLISTDELEGATE_H
|
||||
#define TRANSFERLISTDELEGATE_H
|
||||
#pragma once
|
||||
|
||||
#include <QItemDelegate>
|
||||
#include <QStyledItemDelegate>
|
||||
|
||||
class QModelIndex;
|
||||
class QPainter;
|
||||
class QStyleOptionViewItem;
|
||||
|
||||
class TransferListDelegate : public QItemDelegate
|
||||
class TransferListDelegate : public QStyledItemDelegate
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_DISABLE_COPY(TransferListDelegate)
|
||||
|
||||
public:
|
||||
TransferListDelegate(QObject *parent);
|
||||
explicit TransferListDelegate(QObject *parent);
|
||||
|
||||
void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
QWidget *createEditor(QWidget *, const QStyleOptionViewItem &, const QModelIndex &) const override;
|
||||
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
|
||||
};
|
||||
|
||||
#endif // TRANSFERLISTDELEGATE_H
|
||||
|
||||
Reference in New Issue
Block a user