[Qt-qml] Title bar in a rounded rectangle

alan.westbrook at nokia.com alan.westbrook at nokia.com
Wed Sep 1 03:41:22 CEST 2010


This is probably also overkill, but you could have a rounded rect and a non rounded one of the same color, with the square one overlapping the bottom of the upper rounded one

Rect {
	id: parent
	border.radius: 10
	color: "white"

	Rect {
		id: titletop
		height: 40
		border.radius: 10
		color: "lightblue"
	}
	
	Rect {
		id: titlebottom
		height: titletop.radius
		anchors.top: titletop.bottom
		anchors.topMargin: titletop.radius
		color: titletop.color
	}
}

That sort of thing.


On Aug 31, 2010, at 6:17 PM, ext Alex wrote:

> Hi all,
> 
> This is kind of a frivolous thing, but I thought I'd ask :-)
> 
> I haven't found a good way to create a rounded rectangle with a title
> bar, such as the following example:
> 
> http://development.lombardi.com/wp-content/uploads/2009/04/panelwithtitleandbutton.png
> 
> Since it is not possible to round individual corners, I can't just put
> two rectangles in a Column.  BorderImage seems like overkill.
> 
> Is there a good way to do this?
> 
> Cheers,
> Alex
> _______________________________________________
> Qt-qml mailing list
> Qt-qml at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-qml





More information about the Qt-qml mailing list