Giter VIP home page Giter VIP logo

Comments (7)

zhiyiYo avatar zhiyiYo commented on June 9, 2024

换成子类并重写那几个方法,用 lambda 看起来有点奇怪

from pyqt-fluent-widgets.

Lin-Yuhao avatar Lin-Yuhao commented on June 9, 2024

因为只用一次,继承子类代码量就多了

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on June 9, 2024

没看出代码有什么问题

from pyqt-fluent-widgets.

Lin-Yuhao avatar Lin-Yuhao commented on June 9, 2024

card修改颜色后,初始颜色正常显示,但是鼠标放上去,颜色就会变成默认的黑白色。
修改颜色方法正常来说应该始终改变颜色,不管有没有触发hover鼠标悬停事件。

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on June 9, 2024

最小能运行的代码发一份?

from pyqt-fluent-widgets.

Lin-Yuhao avatar Lin-Yuhao commented on June 9, 2024

card = CardWidget() card.setBackgroundColor(QColor("#DC143C"))

运行这个代码就能测试,鼠标放在card上,颜色就会变成默认颜色

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on June 9, 2024

感觉这个逻辑没什么问题?因为 card widget 监听了 hover 和 press,一旦 hover 之后就会变成 _hoverBackgroundColor() 返回的颜色

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.