Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. What is levelOfDetail in QStyleOptionGraphicsItem

What is levelOfDetail in QStyleOptionGraphicsItem

Scheduled Pinned Locked Moved Unsolved General and Desktop
6 Posts 3 Posters 1.1k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    What is levelOfDetail in QStyleOptionGraphicsItem

    Q 1 Reply Last reply
    0
    • Q Qt Enthusiast

      What is levelOfDetail in QStyleOptionGraphicsItem

      Q Offline
      Q Offline
      Qt Enthusiast
      wrote on last edited by
      #2

      What is levelOfDetail in QStyleOptionGraphicsItem

      and what factores decide it value

      jsulmJ 1 Reply Last reply
      0
      • Q Qt Enthusiast

        What is levelOfDetail in QStyleOptionGraphicsItem

        and what factores decide it value

        jsulmJ Offline
        jsulmJ Offline
        jsulm
        Lifetime Qt Champion
        wrote on last edited by
        #3

        @Qt-Enthusiast Do you mean http://doc.qt.io/qt-4.8/qstyleoptiongraphicsitem.html#levelOfDetailFromTransform ? If so, did you read the documentation?

        https://forum.qt.io/topic/113070/qt-code-of-conduct

        Q 1 Reply Last reply
        0
        • jsulmJ jsulm

          @Qt-Enthusiast Do you mean http://doc.qt.io/qt-4.8/qstyleoptiongraphicsitem.html#levelOfDetailFromTransform ? If so, did you read the documentation?

          Q Offline
          Q Offline
          Qt Enthusiast
          wrote on last edited by
          #4

          @jsulm

          so in the following code

          QImage img(w, h, QImage::Format_RGB32);
          QPainter painter(&img);
          render(&painter); // , QRectF(img.rect()), viewport()->rect());
          img.save(nm);

          what changes shall I do so that levelOfDetail > 0.15

          jsulmJ 1 Reply Last reply
          0
          • Q Qt Enthusiast

            @jsulm

            so in the following code

            QImage img(w, h, QImage::Format_RGB32);
            QPainter painter(&img);
            render(&painter); // , QRectF(img.rect()), viewport()->rect());
            img.save(nm);

            what changes shall I do so that levelOfDetail > 0.15

            jsulmJ Offline
            jsulmJ Offline
            jsulm
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Qt-Enthusiast From the link I posted:
            "Its value represents the maximum value of the height and width of a unity rectangle, mapped using the worldTransform of the painter used to draw the item. By default, if no transformations are applied, its value is 1. If zoomed out 1:2, the level of detail will be 0.5, and if zoomed in 2:1, its value is 2."

            https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • A Offline
              A Offline
              Asperamanca
              wrote on last edited by
              #6

              You can look at the 40000 chips example for a use case: Render a more detailed chip when zoomed in, and a less detailed one when zoomed out.

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved