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. Image, destroy and refresh (SOLVED)
Forum Updated to NodeBB v4.3 + New Features

Image, destroy and refresh (SOLVED)

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 3.3k 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.
  • A Offline
    A Offline
    AlterX
    wrote on last edited by
    #1

    Hi,
    i'm a little problem with QML Image (that uses a flipable):
    1 - I create an Image in the main Rectangle
    2 - Flipping it, i see the background of the main rectangle (correct way)
    3 - I destroy the image (before destroy it, i set opacity = 0)
    4 - I recreate it in the same place
    5 - Flipping it, i see the old last "image" (flipped or not depend on its state before recreation) shaped in the backgroud!

    The second image works well, but it seems it doesn't refresh the background after the action taken in point .3

    Anyone can help me?
    Thank you

    Qt Ambassador
    Real-time cooperative teams: http://www.softairrealfight.net
    Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

    https://codereview.qt-project.org/...

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thisisbhaskar
      wrote on last edited by
      #2

      Do you mean even after replacing the old image with new image, it still shows the old image..

      Can you post the code ... more specifically the part where you delete the old image and create a new image ??

      1 Reply Last reply
      0
      • I Offline
        I Offline
        itwiz
        wrote on last edited by
        #3

        Can you please share code?Also I could not what do you mean by " but it seems it doesn’t refresh the background".

        1 Reply Last reply
        0
        • A Offline
          A Offline
          AlterX
          wrote on last edited by
          #4

          Hi, thanks for the responses...
          well, when the image flip on y axis, you are able to view the container canvas...so if my background is red, during flipping i see the red color under the image...if it is the first start i see that; now if i destroy the object and than recreate it in the same place, when i flip the image i don't see the red color, but the back of the image flipped!!

          The code is a bit complex: i've an array of images and with a for I destroy it!

          Qt Ambassador
          Real-time cooperative teams: http://www.softairrealfight.net
          Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

          https://codereview.qt-project.org/...

          1 Reply Last reply
          0
          • A Offline
            A Offline
            AlterX
            wrote on last edited by
            #5

            :-)
            Sorry for the wasted time!
            Analyzing the cleaner, i saw that routine is never called somewhere!!!

            Now it works
            Sorry dudes

            Qt Ambassador
            Real-time cooperative teams: http://www.softairrealfight.net
            Free Real-time network platform sdk: https://github.com/AlterX76/Solomon

            https://codereview.qt-project.org/...

            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