21 #include <QMouseEvent> 29 using std::shared_ptr;
38 setAttribute(Qt::WA_NoSystemBackground,
true);
43 if (item && item->enabled())
59 event->setAccepted(
false);
65 QMenu *menu = r->create_header_context_menu(
this);
67 event->setAccepted(
true);
68 menu->popup(event->globalPos());
76 if (event->key() == Qt::Key_Delete) {
88 bool cursor_above_widget = rect().contains(mapFromGlobal(QCursor::pos()));
90 if (!cursor_above_widget)