开发者

Creating different shape buttons?

I have to implement different shapes button like round shape , ellipse shape. How do i start 开发者_开发技巧Please give a direction , example code.

I am new to qt and in my first application i have to implement the same. Please help me.

Thanks.


Create your own subclass of button deriving from QAbstractButton. Then you can draw it in any shape you want.


you can use qt stylesheets.

For example;

QPushButton{
border-radius: 40;
border: 1px solid black;
padding: 0px;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜