Questions tagged [qtsvg]

The QtSvg module provides classes for displaying and creating SVG files.

The QtSvg module provides classes for displaying and creating SVG files.

http://qt-project.org/doc/qt-4.8/qtsvg.html

17 questions
51
votes
3 answers

Unknown module(s) in QT: svg

Added QT += svg and I tried just QT += svg and greaterThan(QT_MAJOR_VERSION, 4): QT += svg to the .pro solution file and ran qmake from inside the QtCreator and got this error: error: Unknown module(s) in QT: svg Any ideas?
user3191398
7
votes
0 answers

Why do animated elements in QtSvg need to be of type animateTransform in order to work?

To show SVG-drawings in my application i use GtGui.QgraphicsView, QtGui.QgraphicsScene, QtSvg.QgraphicsSvgItem. Because QsvgRenderer supports animated SVG-Drawings i have integrated some animated elements in my SVG-files, e.g.:
a_manthey_67
  • 3,498
  • 1
  • 12
  • 22
3
votes
1 answer

How to open svg file in QT (QGraphicsView)

How to open svg file like png file. For example it works for png file: scene=new QGraphicsScene(QRect(10, 10, 680, 520)); view=new QGraphicsView(this); image=new QGraphicsPixmapItem(QPixmap("example.png")); scene ->addItem(image); view…
user3191398
3
votes
2 answers

QML error says that svg is unsupported

I've used plugins before, but after I recompiled my qt libraries, I haven't been able to successfully use .svg image files any longer. There error I get is as…
2
votes
1 answer

QtSvg ignores units

Is there a way to get QSvgWidget/QSvgRenderer to work with units like cm/mm/in/pc? Here's a sample SVG where all lines should have the same length (it renders correctly in Firefox and Chrome):
rmweiss
  • 574
  • 5
  • 14
2
votes
1 answer

QSvgGenerator converts QSvgGraphicsItem to image when generating Svg

I have a bunch of SVG files that I've loaded them (as QGraphicsSvgItem) into a QGraphicsScene for designing and everything is Ok, now I want to save the scene into another output SVG file (including all the Svg items) with QSvgGenerator with the…
2
votes
1 answer

svg rendering in Qt (with pygal charts)

I am trying to render styled pygal charts using Qt SVG renderer. But I still problems with background colors because it is black. Shouldn't it be controlled by the style of pygal chart? It should look like the first chart in…
V.K.
  • 4,040
  • 1
  • 20
  • 54
2
votes
1 answer

Set dimensions of an SVG image in fullscreen using QSvgWidget in PyQT?

I am lost with my PyQT programm. I want to display SVG image on full screen, but I need to be able to set the scale and position of the image and rest of the screen fill with black colour. I use QSvgWidget and regular QWidget on top of each other,…
MMM
  • 21
  • 2
1
vote
1 answer

How to make QSvgGenerator produce vectorized SVG instead of bitmapped SVG?

I'm trying to export my QGraphicsScene to an SVG like this: void MyScene::toSvg(QString filename) { QSvgGenerator svgGen {}; svgGen.setFileName(filename); svgGen.setSize({ 200, 200 }); svgGen.setViewBox(QRect(0, 0, 200, 200)); …
juzzlin
  • 38,196
  • 4
  • 25
  • 37
1
vote
1 answer

How can I stop a QSvgWidget from spawning it's own window

I have just worked out how to show an svg image in pyqt5 using QSvgWidget and have tried to transplant it into a blank gui created with the qt designer. The svg image displays but in it's own window instead of in a container or boarder. I have…
ajcraig
  • 13
  • 3
1
vote
0 answers

Is it possible to install QtSvg for PyQt5 using PyCharm into a venv (not using os packages via apt-get, et cetera)?

My Python3 project needs the QtSvg module (from PyQt5) on Python3. How can I (automatically) install the missing QtSvg using PyCharm into a venv, etc.? I'm aware of the fact that there are OS distribution-specific packages on top of the base…
TheDiveO
  • 910
  • 10
  • 18
1
vote
0 answers

ImportError: No module named QtSvg when opening Spyder in Ubuntu 16.04

Initially, I installed spyder 3 using sudo pip install spyder and everything worked well. After that, I was trying to solve the issue of having very small icons in high resolutions screen discussed here. For that, I installed pyqt4 (since I'm using…
Makondo
  • 324
  • 3
  • 15
1
vote
1 answer

Error running NetAnim from QtCreator

I have QtCreator based on Qt version 5.2.1 I'm building NetAnim app. It builds with no errors but when I try to run the application I have errors. In case of RELEASE build I get the following error "Cannot mix incompatible Qt library (version…
Fouda
  • 261
  • 1
  • 2
  • 12
0
votes
1 answer

Clickable SVG image to run method

I have created an SVG image of a map (trains) that needs to be interactive and when a section of the map is clicked, the colour will change and a method to control things (via a raspberry Pi) will be executed. For connecting a button to a slot is…
johnashu
  • 2,101
  • 2
  • 14
  • 34
0
votes
1 answer

Get SVG size from QSvgRenderer

Suppose I have an SVG something like this:
Timmmm
  • 68,359
  • 51
  • 283
  • 367
1
2