yjg30737 / pyqt-frameless-window

PyQt(+PySide) Frameless Window
MIT License
38 stars 5 forks source link

changing cursor shape on edge hover needs to be more forgiving #1

Open rising-dancho opened 2 years ago

rising-dancho commented 2 years ago

extremely cool and sophisticated program. only requires one thing to be perfect, it just needs improvement on the edge detection for the cursor. since it requires too much precision from the user in order to drag the edge when attempting to resize. i'm interested to know on how that maybe done. it would be a great help. looking into ways on how to do that as well. hope it helps

yjg30737 commented 2 years ago

Actually that's one of the hardest part of this module.

I hope edge detection works well outside of the window but I've never found the platform-independent way to do it.

But that doesn't mean there is absolutely no way to deal with this problem.

As far as i concern, there are 5 options. Yes, it is not a solution but it can be helpful a little bit.

  1. Increase the margin with setMargin function. (But it makes window frame thicker)
  2. Make invisible frame. (I still can't make this.)
  3. Using shadow frame to detect the cursor.
  4. Make event handler and catch the leaveEvent when cursor gets out of the box no matter how it looks like such as "↔". But currently event handler catches the leaveEvent as if cursor is normal shape.
  5. Using specified way for each OS.