Index: src/globals.h
===================================================================
--- src/globals.h	(revision 9cda6e0f5d8ac68ad13492d29d2a6a3a73a8f32b)
+++ src/globals.h	(revision ca3d2a30fa147964b831ffc9b42a456482d4ab33)
@@ -32,4 +32,5 @@
 #include <QtCore>
 #include <QtGui>
+#include <QtSvg>
 
 // Version info
Index: src/main.cpp
===================================================================
--- src/main.cpp	(revision 9cda6e0f5d8ac68ad13492d29d2a6a3a73a8f32b)
+++ src/main.cpp	(revision ca3d2a30fa147964b831ffc9b42a456482d4ab33)
@@ -34,6 +34,6 @@
 
 #ifdef STATIC_BUILD
-//	Q_IMPORT_PLUGIN(qjpeg)
-//	Q_IMPORT_PLUGIN(qsvg)
+	Q_IMPORT_PLUGIN(qjpeg)
+	Q_IMPORT_PLUGIN(qsvg)
 #endif
 
Index: src/mainwindow.cpp
===================================================================
--- src/mainwindow.cpp	(revision 9cda6e0f5d8ac68ad13492d29d2a6a3a73a8f32b)
+++ src/mainwindow.cpp	(revision ca3d2a30fa147964b831ffc9b42a456482d4ab33)
@@ -218,23 +218,39 @@
 	}
 #endif
+	if (selectedFile.endsWith(".htm", Qt::CaseInsensitive) || selectedFile.endsWith(".html", Qt::CaseInsensitive)) {
+QFile file(selectedFile);
+		if (!file.open(QFile::WriteOnly)) {
+			QApplication::restoreOverrideCursor();
+			QMessageBox::critical(this, tr("Solution Save"), tr("Unable to save the solution.\nError: %1").arg(file.errorString()));
+			return;
+		}
+QFileInfo fi(selectedFile);
+QString html = solutionText->document()->toHtml("UTF-8"),
+		img = fi.completeBaseName() + ".svg";
+		html.replace(QRegExp("<img\\s+src=\"tspsg://graph.pic\""), QString("<img src=\"%1\" width=\"%2\" height=\"%3\" alt=\"%4\"").arg(img).arg(graph.width() + 1).arg(graph.height() + 1).arg(tr("Solution Graph")));
+		// Saving solution text as HTML
+QTextStream ts(&file);
+		ts.setCodec(QTextCodec::codecForName("UTF-8"));
+		ts << html;
+		file.close();
+		// Saving solution graph as SVG
+QSvgGenerator svg;
+		svg.setFileName(fi.path() + "/" + img);
+		svg.setTitle(tr("Solution Graph"));
+QPainter p;
+		p.begin(&svg);
+		graph.play(&p);
+		p.end();
+
+// Qt < 4.5 has no QTextDocumentWriter class
 #if QT_VERSION >= 0x040500
+	} else {
 QTextDocumentWriter dw(selectedFile);
-	if (!(selectedFile.endsWith(".htm",Qt::CaseInsensitive) || selectedFile.endsWith(".html",Qt::CaseInsensitive) || selectedFile.endsWith(".odt",Qt::CaseInsensitive) || selectedFile.endsWith(".txt",Qt::CaseInsensitive)))
-		dw.setFormat("plaintext");
-	if (!dw.write(solutionText->document()))
-		QMessageBox::critical(this, tr("Solution Save"), tr("Unable to save the solution.\nError: %1").arg(dw.device()->errorString()));
-#else // QT_VERSION >= 0x040500
-	// Qt < 4.5 has no QTextDocumentWriter class
-QFile file(selectedFile);
-	if (!file.open(QFile::WriteOnly)) {
-		QApplication::restoreOverrideCursor();
-		QMessageBox::critical(this, tr("Solution Save"), tr("Unable to save the solution.\nError: %1").arg(file->errorString()));
-		return;
-	}
-QTextStream ts(&file);
-	ts.setCodec(QTextCodec::codecForName("UTF-8"));
-	ts << solutionText->document()->toHtml("UTF-8");
-	file.close();
+		if (!selectedFile.endsWith(".odt",Qt::CaseInsensitive))
+			dw.setFormat("plaintext");
+		if (!dw.write(solutionText->document()))
+			QMessageBox::critical(this, tr("Solution Save"), tr("Unable to save the solution.\nError: %1").arg(dw.device()->errorString()));
 #endif // QT_VERSION >= 0x040500
+	}
 	QApplication::restoreOverrideCursor();
 }
Index: tspsg.pro
===================================================================
--- tspsg.pro	(revision 9cda6e0f5d8ac68ad13492d29d2a6a3a73a8f32b)
+++ tspsg.pro	(revision ca3d2a30fa147964b831ffc9b42a456482d4ab33)
@@ -11,5 +11,5 @@
 ######################################################################
 
-#QT += svg
+QT += svg
 
 TEMPLATE = app
@@ -50,5 +50,5 @@
 contains(QMAKE_PRL_CONFIG, static) {
 # We "embed" SVG and JPEG support on static build
-#	QTPLUGIN += qjpeg qsvg
+	QTPLUGIN += qjpeg qsvg
 	DEFINES += STATIC_BUILD
 }
@@ -113,5 +113,5 @@
 	share.files = $$[QT_INSTALL_BINS]/QtCore$${D}4.dll \
 		$$[QT_INSTALL_BINS]/QtGui$${D}4.dll
-#		$$[QT_INSTALL_BINS]/QtSvg$${D}4.dll
+		$$[QT_INSTALL_BINS]/QtSvg$${D}4.dll
 	l10n.files += $$[QT_INSTALL_TRANSLATIONS]/*.qm
 	win32-g++ {
@@ -134,5 +134,5 @@
 
 	DEPLOYMENT += target share l10n docs
-#	DEPLOYMENT_PLUGIN += qjpeg qsvg
+	DEPLOYMENT_PLUGIN += qjpeg qsvg
 }
 
@@ -160,5 +160,5 @@
 		"\"COPYING\" - \"\", FILETEXT, TEXTEXIT"
 	DEPLOYMENT += share l10n docs
-#	DEPLOYMENT_PLUGIN += qjpeg qsvg
+	DEPLOYMENT_PLUGIN += qjpeg qsvg
 
 	ICON = resources/tspsg.svg
