dragonpilot - 基於 openpilot 的開源駕駛輔助系統
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

18 lines
433 B

#include "selfdrive/ui/qt/util.h"
#include <QStyleOption>
#include <QDebug>
ClickableWidget::ClickableWidget(QWidget *parent) : QWidget(parent) { }
void ClickableWidget::mouseReleaseEvent(QMouseEvent *event) {
emit clicked();
}
// Fix stylesheets
void ClickableWidget::paintEvent(QPaintEvent *) {
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}