开发者

How to use QStackedWidget/QStackedLayout in PyQT/PyKDE?

开发者 https://www.devze.com 2023-02-04 21:46 出处:网络
I am trying to create a properties panel as part of a larger application, which uses PyKDE and PyQT. QStackedWidget and QStackedLayout look r开发者_Python百科ight, but the situation is a bit complicat

I am trying to create a properties panel as part of a larger application, which uses PyKDE and PyQT. QStackedWidget and QStackedLayout look r开发者_Python百科ight, but the situation is a bit complicated:

  • The QStacked(Widget|Layout) is a subitem of a splitter,
  • The QStacked(Widget|Layout) contains:
    • A text field
    • A QFormLayout (for the properties)

Using a QStackedWidget means I can't add layouts (only widgets), using QStackedLayout results in all sorts of problems, because everything expects to work with widgets rather than layouts.

How can I get out of this mess?


Well you could add QFrames to your stacked widget and then adding the necessary widgets to the frame

0

精彩评论

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