diff --git a/ReText/window.py b/ReText/window.py
index <HASH>..<HASH> 100644
--- a/ReText/window.py
+++ b/ReText/window.py
@@ -978,6 +978,9 @@ class ReTextWindow(QMainWindow):
 			return
 		printer = self.standardPrinter()
 		preview = QPrintPreviewDialog(printer, self)
+		# Remove Dialog flag, then add a maximize button using bitwise XORs
+		notDialog = preview.windowFlags() ^ (Qt.Window ^ Qt.Dialog)
+		preview.setWindowFlags(notDialog ^ Qt.WindowMaximizeButtonHint)
 		self.connect(preview, SIGNAL("paintRequested(QPrinter*)"), document.print_)
 		preview.exec_()
Add a maximize button to the print preview dialog
(using some bitwise magic)