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. [Solved]who change image's view and style
Qt 6.11 is out! See what's new in the release blog

[Solved]who change image's view and style

Scheduled Pinned Locked Moved QML and Qt Quick
12 Posts 5 Posters 8.0k 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
    #3

    I want show images clearly when changing, but now image deformed, and I dont't know image's real size ,
    you can see, the first time and second time image is I want, but following image deformed,

    1 Reply Last reply
    0
    • B Offline
      B Offline
      blam
      wrote on last edited by
      #4

      What do you mean by "clearly"? The code does not stretch any of the images, so the images appear to be displayed correctly. Do you want to display them all with the same width and height?

      Also I noticed you have set the Image fillMode, but this would not be doing anything at the moment as the Image width/height properties have not been set, and so it is being automatically sized to the width/height of the source image.

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

        you can see here, 5 snapshots when click

        http://www.flickr.com/photos/42560763@N06/5348376323/
        http://www.flickr.com/photos/42560763@N06/5348376339/
        http://www.flickr.com/photos/42560763@N06/5348376347/
        http://www.flickr.com/photos/42560763@N06/5348376363/
        http://www.flickr.com/photos/42560763@N06/5348376373/

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbrasser
          wrote on last edited by
          #6

          Hi,

          The example seems to work fine for me, working off of the qtquick11 branch, so most likely it is a bug that has been fixed, but not yet released.

          As a workaround, does getting rid of the fillMode altogether fix things for you?

          Regards,
          Michael

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

            Oh.
            fillMode , all enum value has problem

            1 Reply Last reply
            0
            • M Offline
              M Offline
              mbrasser
              wrote on last edited by
              #8

              If you don't use any fillMode at all (i.e. remove the fillMode) does it work correctly for you?

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mohsen
                wrote on last edited by
                #9

                you may also use states to switch between different views http://doc.qt.nokia.com/4.7-snapshot/qdeclarativestates.html

                even, it's more easy to do with latest Qt Creator.

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

                  No.
                  because default value is Stretch and I test all enum value which has the same problem.
                  Just like no guys encounter the problem , I used qt4.7.1 release version, windows7 and ubuntu10.10

                  [quote author="mbrasser" date="1294911036"]If you don't use any fillMode at all (i.e. remove the fillMode) does it work correctly for you?[/quote]

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mbrasser
                    wrote on last edited by
                    #11

                    [quote author="bellnas" date="1294927630"]No.
                    because default value is Stretch and I test all enum value which has the same problem.
                    [/quote]

                    Okay. Unfortunately you will probably need to wait for an upcoming release where this is fixed for a nice solution. I've been able to hack it to work for me in 4.7.1 by setting

                    @
                    logo.source = ""
                    logo.sourceSize = "0x0"
                    @

                    each time before setting the source.

                    Regards,
                    Michael

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

                      Thanks mbrasser.
                      you are great and you are much 给力

                      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