[solved] How to make rect-like figure?
-
How i can make figure like that:
!http://s24.postimg.org/m8yvejw01/rect.png(image)!
(Two merged rectangles without border on intersection line)? -
Hi,
IMO the best way would be to use QQuickPaintedItem and then draw the shape using QPainterPath. -
Adding to the previous post: You have to write a C++ extension for QML. The process is described here:
http://qt-project.org/doc/qt-5/qml-extending-tutorial-index.html -
Maybe I didn't understand the question correctly, but this code produces the image shown. I just hacked this together, might be better to use explicit z ordering but this works.
@ Rectangle{
x: 10
y:10
width: 50; height: width
color:"white"
border.width: 4
border.color: "black"
}Rectangle{ x: 10 y:30 width: 200; height: 100 color:"white" border.width: 4 border.color: "black" } Rectangle{ x: 14 y:30 width: 42; height: 10 color:"white" border.width: 1 border.color: "white" }
@
!https://dl.dropboxusercontent.com/u/41770120/RectLike.png(result of code)!