Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8199

QGraphicsSvgItem warning when loading certain svg

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • P3: Somewhat important
    • None
    • 4.6.1
    • SVG Support
    • None

    Description

      When creating QGraphicsSvgItem the following warning sometimes appears :
      QFont::setPointSize: Point size <= 0 (0), must be greater than 0

      The attached osa_desktop.svg file triggers the warning.
      I removed the "PONY" path which is located at the bottom of the screen picture and the warning
      does not appear (attached file osa_desktop_modified.svg)

      Here is a small main to reproduce the issue :

      main.cpp
      #include <QtGui/QApplication>
      #include <QtGui/QGraphicsView>
      #include <QtGui/QGraphicsScene>
      #include <QtSvg/QGraphicsSvgItem>
      
      int main(int argc, char ** argv)
      {
              QApplication app(argc, argv);
              QGraphicsScene scene;
              QGraphicsView view(&scene);
              qDebug("original svg");
              scene.addItem(new QGraphicsSvgItem("osa_desktop.svg"));
              qDebug("modified svg");
              scene.addItem(new QGraphicsSvgItem("osa_desktop_modified.svg"));
              return app.exec();
      }
      

      Running this program outputs the following :
      original svg
      QFont::setPointSize: Point size <= 0 (0), must be greater than 0
      modified svg

      We were already using this svg file with Qt 4.5.3 and there was no warning.

      The original icon is from the OSA Icon Library (http://www.opensecurityarchitecture.org/cms/library/icon-library)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            jbrouault Jean-Baptiste Rouault
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes