Giter Site home page Giter Site logo

Comments (8)

oraant avatar oraant commented on May 18, 2024 1

我试了试,在 PyQt5 和 PySide6 上是可以的。

    def __init__(self, text='', parent=None):
        ........................ # 其他代码
        # set style
        self.setAttribute(Qt.WA_TransparentForMouseEvents) # 加在了这里
        self.setAttribute(Qt.WA_TranslucentBackground)
        self.setWindowFlags(Qt.Tool | Qt.FramelessWindowHint)
        self.setDarkTheme(False)
        self.__setQss()

加完后,按钮2,就是那个很长的竖条,也不闪了。

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

感谢反馈,不过真的会有人在工具提示上面设置那么长的文本吗🤔

from pyqt-fluent-widgets.

oraant avatar oraant commented on May 18, 2024

感谢反馈,不过真的会有人在工具提示上面设置那么长的文本吗🤔

一些简单的换行提示还是很常见的,如果多个按钮的提示行数不同,则容易出现按钮3/4的问题

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

调整大小的 bug 应该已经修好了,至于长文本超出屏幕区域的问题目前没有修复的打算,因为做了这么久的项目没有用过那么长的提示条

from pyqt-fluent-widgets.

oraant avatar oraant commented on May 18, 2024

调整大小的 bug 应该已经修好了,至于长文本超出屏幕区域的问题目前没有修复的打算,因为做了这么久的项目没有用过那么长的提示条

大佬您是真的肝啊……

我看了下代码,按钮2的问题或许可以再考虑一下。

如果提示条有换行导致高度较高,而窗口或按钮又比较靠近屏幕顶端时(比如一些顶部的菜单按钮),疯狂闪烁的问题应该依然会发生。

可以试下按钮4的情况。拖动窗口靠近屏幕顶端,鼠标放到按钮4上。
提示条出现后遮挡按钮,导致按钮触发 LeaveEvent ,然后提示条关闭,导致按钮触发 EnterEvent,然后疯狂闪烁。

话说大半夜的写代码不累么,我快要困死了

from pyqt-fluent-widgets.

oraant avatar oraant commented on May 18, 2024

目测加个 self.setAttribute(Qt.WA_TransparentForMouseEvents) 就好了,懒得发 PR 了

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

不行的,只要工具提示一弹出来就会引发 leaveEvent,然后就会一直闪烁,就算是 windows 的工具提示也有这个问题

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

牛啊,确实有用,可能是我之前加的位置有问题

from pyqt-fluent-widgets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.