开发者

How to draw a simple horizontal rule in a QWidget?

开发者 https://www.devze.com 2023-01-29 10:10 出处:网络
I just want to add a horizontal rule (just like <hr> in HTML, see below) to a QWidget. But I failed t开发者_如何学编程o find such a class in the documentation.

I just want to add a horizontal rule (just like <hr> in HTML, see below) to a QWidget.


But I failed t开发者_如何学编程o find such a class in the documentation.

Could anyone give me example code?


This can be done using a QFrame and setting the shape with setFrameShape(QFrame::HLine) and frame shadow using setFrameShadow(QFrame::Sunken). I just noticed that you are working in Python. My answer uses C++ syntax. Hopefully it is sufficient :)

0

精彩评论

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

关注公众号