Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

How to set radius in Image Element



  • Hi guys,

    I need to show a kindly thumbnail Image to user, so I must set radius property in Image Element like Rectangle.
    Any idea?

    Regards,
    Leaf



  • You can find a similar topic here which might help: http://developer.qt.nokia.com/forums/viewthread/1020





  • Hi,

    I have read both the cited thread and for a while I had the illusion that there was a solution best than mine. Unforunately all these solution seems ... not solutions.

    At the moment I have solved with a masking system. In the Qt-Complex 2.0 version that I will release I have implemented a well working button object in several declinations where the rectangular image icon is masked with a drilled png. If your need the code you can keep in touch the Qt-Comlpex 2.0 project I will release in about a week.
    The annoying question - partially solved by the theming capabilities of the framework - is that the mask of the button (that is rectangular anyway) should be of the same background color. This means to build for every kind of background a different mask.

    I am thinking to a completely different approach: in the graphic capabilities of the QML is there something like the subtraction between objects? If yes, please advice me where I can search for some example or documentation else I have another solution in mind that it more complex but can be done one time for ever.



  • I found a new qt-component element "Here...":https://bugreports.qt.nokia.com/browse/QTCOMPONENTS-388.
    Should I use the element now?



  • I think you can try, but as I read in the bugreport, it is actually unsolved and seems partially working.

    On Qt 4.7.4 is documented and I think that with some test and experiemnts maybe used as well. It is possible that it don't give the desired result. I will try it later.

    Thanks for the advice, as I have a working code (if any) I'll post it.



  • Hi Alicemirror,
    I tried and it doesn't work, so I will keep the post and waiting.Any way thank your help and work.
    Good luck to you.


Log in to reply