Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
qtws26_logo

The Qt Event of the Year: Qt World Summit 2026

Save Your Spot >
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Repeat image until fills the entire rectangle in QML
Qt 6.12 LTS is out! See what's new in the release blog

Repeat image until fills the entire rectangle in QML

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 6.9k Views 1 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hi everyone. So I'm facing a little problem. I'm not sure if it's an easy way to do this , but I have to ask.
    So.. I have a rectangle and I want to fill the rectangle with a picture with the same height as the rectangle but with smaller width and I want the picture to repeat on x axis until it fills the entire rectangle.
    With other words I'm looking for something similar with repeat background image from HTML/CSS:
    @<div style="background-image:url('pic.jpg'); background-repeat:repeat-x;"></div>@

    Thanks

    1 Reply Last reply
    0
    • D Offline
      D Offline
      DenisKormalev
      wrote on last edited by
      #2

      Looks like "this":http://doc.qt.nokia.com/4.7/qml-image.html#fillMode-prop property will help you

      1 Reply Last reply
      0
      • ? Offline
        ? Offline
        A Former User
        wrote on last edited by
        #3

        Thanks. How could I missed that? That helps me a lot. I was thinking of using Repeater but this is a much better solution

        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
        • Unsolved