Results 1 to 2 of 2

Thread: How to add SVG file at tab widget(Tab1) ??

  1. #1
    Join Date
    May 2019
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default How to add SVG file at tab widget(Tab1) ??

    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 ??
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,229
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: How to add SVG file at tab widget(Tab1) ??

    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.

Similar Threads

  1. defining a widget from the ui file
    By ravas in forum Newbie
    Replies: 7
    Last Post: 23rd June 2015, 23:09
  2. Displaying a eml file in a widget
    By merry in forum Qt Programming
    Replies: 2
    Last Post: 29th August 2013, 18:36
  3. Replies: 10
    Last Post: 4th July 2013, 13:53
  4. Display a jpg file in a widget.
    By sonu in forum Qt Programming
    Replies: 4
    Last Post: 26th October 2007, 16:17

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.