diff --git a/src/UI/Utils.cc b/src/UI/Utils.cc
new file mode 100644
index 0000000000000000000000000000000000000000..95f9269d01b74fab6579a1a68ae28878cea2c62d
--- /dev/null
+++ b/src/UI/Utils.cc
@@ -0,0 +1,12 @@
+#include "Utils.hh"
+#include <QWidget>
+
+using namespace Vivy;
+
+void
+Utils::setTransparentBackgroundForWidget(QWidget *const w) noexcept
+{
+    w->setAttribute(Qt::WA_NoSystemBackground);
+    w->setAttribute(Qt::WA_TranslucentBackground);
+    w->setAttribute(Qt::WA_TransparentForMouseEvents);
+}
diff --git a/src/UI/Utils.hh b/src/UI/Utils.hh
new file mode 100644
index 0000000000000000000000000000000000000000..34b57e2a119bcae629be2901e2332a26d7341836
--- /dev/null
+++ b/src/UI/Utils.hh
@@ -0,0 +1,12 @@
+#pragma once
+
+#ifndef __cplusplus
+#error "This is a C++ header"
+#endif
+
+class QWidget;
+
+namespace Vivy::Utils
+{
+void setTransparentBackgroundForWidget(QWidget *const) noexcept;
+}