diff --git a/satellites/extrafiles/qbittorrent/qbittorrent-3.3.12-preview-file-on-double-click.patch b/satellites/extrafiles/qbittorrent/qbittorrent-3.3.12-preview-file-on-double-click.patch
new file mode 100644
index 0000000..81956b5
--- /dev/null
+++ b/satellites/extrafiles/qbittorrent/qbittorrent-3.3.12-preview-file-on-double-click.patch
@@ -0,0 +1,47 @@
+# This patch adds the functionality of previewing a file when double-clicking on it.
+# I hope to send this patch to upstream soon, but handling translations is a pain.
+
++++ src/gui/optionsdlg.h
+@@ -44,6 +44,7 @@
+ {
+ TOGGLE_PAUSE,
+ OPEN_DEST,
++ PREVIEW,
+ NO_ACTION
+ };
+
++++ src/gui/optionsdlg.ui
+@@ -295,6 +295,11 @@
+
+ -
+
++ Preview file
++
++
++ -
++
+ No action
+
+
+@@ -320,6 +325,11 @@
+
+
+ -
++
++ Preview file
++
++
++ -
+
+ No action
+
++++ src/gui/transferlistwidget.cpp
+@@ -239,6 +239,9 @@
+ else
+ Utils::Misc::openPath(torrent->contentPath(true));
+ break;
++ case PREVIEW:
++ if (torrent->hasMetadata())
++ new PreviewSelect(this, torrent);
+ }
+ }
diff --git a/satellites/qbittorrent.sat b/satellites/qbittorrent.sat
index bb45747..5310506 100644
--- a/satellites/qbittorrent.sat
+++ b/satellites/qbittorrent.sat
@@ -5,12 +5,16 @@ version=3.3.12
update_url='https://www.qbittorrent.org/download.php'
define_option '!qt4: Build for Qt4 instead of Qt5'
+define_option '!patch: Apply some custom patches'
dlextract "http://sourceforge.net/projects/$name/files/$name/$name-$version/$name-$version.tar.xz" \
'2537a5afa16e2b9b86e88412dc59f7fb'
+option patch extrafile "$name-$version-preview-file-on-double-click.patch"
header_end
cd "$name-$version"
+option patch patch -p0 -i "../$name-$version-preview-file-on-double-click.patch"
+
compile_configure -I -- \
--with-qtsingleapplication=shipped \
$(option qt4 && echo '--with-qt4 --with-qjson=shipped' || echo '--without-qt4')