Determining Qt stylesheet options programmatically?

前端 未结 2 720
挽巷
挽巷 2021-01-18 00:25

Is it possible to look up stylesheet values at runtime in Qt?

I\'m working on a custom button derived from QPushButton that has some stylesheet properti

2条回答
  •  南方客
    南方客 (楼主)
    2021-01-18 00:52

    Don't think so, you might be able to find something by stepping through the drawing code. But the parsing and the application of stylesheets is pretty optimised and uses a lot of preprocessing. I don't even think that you can get to the stylesheet of a widget if it was actually set in a parent.

提交回复
热议问题