June 27, 2011

spode spode
Lab Rat
317 posts

[Solved] Particular radius

 

how to get rettangle with just an radied angle?
as this:
http://imageshack.us/photo/my-images/846/immagineep.png

Edit: Moved to Qt Quick since OP wants to do this with QML. ZapB

10 replies

June 27, 2011

Gerolf Gerolf
Robot Herder
3252 posts

you need only one rounded edge?
I think you then have to draw it by hand…

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

June 27, 2011

ZapB ZapB
Ant Farmer
1424 posts

Or split it into 4 rects and set a rounded corner on the lower left one. This will lead to some overdraw though.

Or use the BorderImage QML element.

Where are you wanting to do this (ie in a widget a QGraphicsScene or in a QML scene)?

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

June 27, 2011

Denis Kormalev Denis Kormalev
Lab Rat
1654 posts

BorderImage will work ok. Also you can draw border pixmap not only in QML, but in C++ too.

June 28, 2011

spode spode
Lab Rat
317 posts

i can not do it. i will use an image! =) thank you!

June 28, 2011

ZapB ZapB
Ant Farmer
1424 posts

Well, what did you try? What did not work?

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

June 28, 2011

spode spode
Lab Rat
317 posts

i am making the rectangle with power point…

June 28, 2011

Gerolf Gerolf
Robot Herder
3252 posts

But how do you want to draw it? In a custom drawn widget? in QML? we need more info…

 Signature 

Nokia Certified Qt Specialist.
Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

June 28, 2011

spode spode
Lab Rat
317 posts

in qml!

June 28, 2011

ZapB ZapB
Ant Farmer
1424 posts

OK, draw it in gimp/inkscape/whatever, export to some suitable format then use BorderImage element in QML.

If this was a QML problem it may have been more appropriate to post it in the Qt Quick forum.

 Signature 

Nokia Certified Qt Specialist
Interested in hearing about Qt related work

June 28, 2011

spode spode
Lab Rat
317 posts

i know. thank you

 
  ‹‹ [Solved] SetContextProperty();      Downloading problem in QML via binding Qt ››

You must log in to post a reply. Not a member yet? Register here!