开发者

Control Selection Border in PyQT

开发者 https://www.devze.com 2023-02-17 21:13 出处:网络
this is my first post here , I am trying to achive something in pyqt , I have a control placed in a widget and when user is selecting that control , i need a selection border something s开发者_开发技巧

this is my first post here , I am trying to achive something in pyqt , I have a control placed in a widget and when user is selecting that control , i need a selection border something s开发者_开发技巧imiler pyqt designer has , I am attching a image for refrenct .

Anybody has any idea how I can aachive this with pyqt ?

Thanks

Control Selection Border in PyQT


I'm pretty sure the general method would be as follows:

  1. Create a QFrame that will serve as a wrapper; pass it the widget you wish to 'select'
  2. Place the wrapped widget in a layout; this will be the QFrame widget's layout.
  3. Overload the functions for a mouse double-click event and a paint event, so that on selection parts of the border are painted.
0

精彩评论

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