Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Scanlines effects on background

Scanlines effects on background

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
7 Posts 4 Posters 520 Views
  • 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.
  • E Offline
    E Offline
    efdiloreto
    wrote on last edited by
    #1

    It's possible to make this effect (scanlines) using Gradients? Which other alternatives do I have?

    alt text

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      Sure, just set up one dark and one lit up line and then use QGradient::RepeatSpread to fill the outside

      EDIT: Sorry, I just noticed you want it in QML and my answer is for Qt Widgets

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      E 1 Reply Last reply
      0
      • E Offline
        E Offline
        efdiloreto
        wrote on last edited by
        #3

        Oh Thanks, I'll try it. I didn't find it in the documentation.

        1 Reply Last reply
        0
        • VRoninV VRonin

          Sure, just set up one dark and one lit up line and then use QGradient::RepeatSpread to fill the outside

          EDIT: Sorry, I just noticed you want it in QML and my answer is for Qt Widgets

          E Offline
          E Offline
          efdiloreto
          wrote on last edited by
          #4

          @VRonin No problem. I'll wait for another answer. Thanks!

          ODБOïO 1 Reply Last reply
          0
          • E efdiloreto

            @VRonin No problem. I'll wait for another answer. Thanks!

            ODБOïO Offline
            ODБOïO Offline
            ODБOï
            wrote on last edited by
            #5

            hi

            @efdiloreto said in Scanlines effects on background:

            Which other alternatives do I have?

            It is possible to use @VRonin s solution
            create any visual Widget and subclass QQuickPaintedItem to expose it to QML
            https://doc.qt.io/qt-5/qtqml-tutorials-extending-qml-example.html

            1 Reply Last reply
            0
            • E Offline
              E Offline
              efdiloreto
              wrote on last edited by
              #6

              Thanks all for the responses. I found this awesome project which have the effects that I want. I will study it.

              1 Reply Last reply
              0
              • GrecKoG Offline
                GrecKoG Offline
                GrecKo
                Qt Champions 2018
                wrote on last edited by
                #7

                That's a good resource. You'll need shaders to achieve that effect.

                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