Make clipboard image scalable (SVG)

This commit is contained in:
Robin Stuart 2017-04-22 12:44:32 +01:00
parent 536f217e78
commit fa40676691
2 changed files with 10 additions and 2 deletions

View File

@ -103,7 +103,7 @@
<string notr="true"/>
</property>
<property name="currentIndex">
<number>0</number>
<number>1</number>
</property>
<widget class="QWidget" name="tabGeneral">
<attribute name="title">
@ -627,6 +627,9 @@ p, li { white-space: pre-wrap; }
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Copy to clipboard</string>
</property>
<property name="text">
<string>&amp;Copy</string>
</property>

View File

@ -274,7 +274,10 @@ void MainWindow::copy_to_clipboard()
{
QClipboard *clipboard = QGuiApplication::clipboard();
QMimeData *data = new QMimeData;
QString filename = ".zint.gif";
QString filename = ".zint.svg";
double scale = spnScale->value();
spnScale->setValue(10);
if (!m_bc.bc.save_to_file(filename)) {
return;
@ -284,6 +287,8 @@ void MainWindow::copy_to_clipboard()
clipboard->setMimeData(data, QClipboard::Clipboard);
QFile::remove(filename);
spnScale->setValue(scale);
}
void MainWindow::change_options()