mirror of
https://github.com/libretro/RetroArch
synced 2025-02-19 12:41:00 +00:00
Qt: allow FileDropWidget to be styleable
This commit is contained in:
parent
b5d5fb4940
commit
50381a0463
@ -217,6 +217,19 @@ FileDropWidget::FileDropWidget(QWidget *parent) :
|
||||
setAcceptDrops(true);
|
||||
}
|
||||
|
||||
void FileDropWidget::paintEvent(QPaintEvent *event)
|
||||
{
|
||||
QStyleOption o;
|
||||
QPainter p;
|
||||
o.initFrom(this);
|
||||
p.begin(this);
|
||||
style()->drawPrimitive(
|
||||
QStyle::PE_Widget, &o, &p, this);
|
||||
p.end();
|
||||
|
||||
QWidget::paintEvent(event);
|
||||
}
|
||||
|
||||
void FileDropWidget::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
if (event->key() == Qt::Key_Delete)
|
||||
|
@ -153,6 +153,7 @@ protected:
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
void dropEvent(QDropEvent *event);
|
||||
void keyPressEvent(QKeyEvent *event);
|
||||
void paintEvent(QPaintEvent *event);
|
||||
};
|
||||
|
||||
class TableWidget : public QTableWidget
|
||||
|
Loading…
x
Reference in New Issue
Block a user