I make a tab widget and have 2 tabs.
I want to show a SVG file at tab1.
How could I offser SVG file add into the tab1's graphics View ??
I make a tab widget and have 2 tabs.
I want to show a SVG file at tab1.
How could I offser SVG file add into the tab1's graphics View ??
QSvgGraphicsItem and QSvgWidget are not the same. If all you want to do it display an SVG file in a widget by itself on a tab, use QSvgWidget. If you want a QGraphicsScene that includes other QGraphicsItem types in addition to the SVG item, then you will use the Qt Graphics/View subsystem to build the scene and display it in your view.
If all you want is simple SVG display, then replace the QGraphicsView in your mainwindow.ui with QSvgWidget.
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
Bookmarks