Giter VIP home page Giter VIP logo

Comments (19)

zhiyiYo avatar zhiyiYo commented on May 18, 2024

等周末有空再试试看吧,我觉得你的方法能用就可以了

from pyqt-fluent-widgets.

fsf678 avatar fsf678 commented on May 18, 2024

球球辣,快加导航和图标

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

别急,晚上就推上去

from pyqt-fluent-widgets.

fsf678 avatar fsf678 commented on May 18, 2024

右上角消息框能搞一些控件在里面吗?我想添加图片、滑块在里面作为一个比较小的音乐播放模块内置在我的应用中?

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

这个你可能得自己写了

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

@Cheukfung
你是怎么让导航部件右边的 QStackedWidget 填满整个界面的,重写主界面 resizeEvent 来调整大小吗?用 QHBoxLayout 的话会有一大片的空白🤔
image

from pyqt-fluent-widgets.

Cheukfung avatar Cheukfung commented on May 18, 2024

@zhiyiYo 用QHBoxLayout,包含 左边的listwidget和右边的stackedwidget,然后把 QHBoxLayout 的 layoutStretch 设置为 0,1,也就是满足listwidget的最小宽度前提下,让stackedwidget撑满整个layout容器

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

我是这么写的,但是并不起作用

self.hBoxLayout.setSpacing(0)
self.hBoxLayout.setContentsMargins(0, self.titleBar.height(), 0, 0)
self.hBoxLayout.addWidget(self.navigationInterface, 0, Qt.AlignLeft)
self.hBoxLayout.addWidget(self.stackWidget, 1, Qt.AlignLeft)

from pyqt-fluent-widgets.

Cheukfung avatar Cheukfung commented on May 18, 2024

试试 self.hBoxLayout.setStretch(0,1)

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

解决了,改成下述代码就 ok 了,chatgpt 确实牛逼,偶尔的神

self.hBoxLayout.setSpacing(0)
self.hBoxLayout.setContentsMargins(0, self.titleBar.height(), 0, 0)
self.hBoxLayout.addWidget(self.navigationInterface)
self.hBoxLayout.addWidget(self.stackWidget)
self.hBoxLayout.setStretchFactor(self.stackWidget, 1)

from pyqt-fluent-widgets.

Cheukfung avatar Cheukfung commented on May 18, 2024

就是把stretch设置为1就可以了

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

@Cheukfung @fsf678
我把最新代码提交上去了,运行 examples/navigation/demo.py 可以看到效果

from pyqt-fluent-widgets.

Cheukfung avatar Cheukfung commented on May 18, 2024

是不是没推到pypi呀

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

还没,你们可以先看下有没有问题吗,如果ok的话我就推上去

from pyqt-fluent-widgets.

Cheukfung avatar Cheukfung commented on May 18, 2024

我运行了demo,没问题的

from pyqt-fluent-widgets.

Cheukfung avatar Cheukfung commented on May 18, 2024

还有一个希望留个接口,实时切换dark mode

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

正在搞

from pyqt-fluent-widgets.

Ephemeralwanning avatar Ephemeralwanning commented on May 18, 2024

正在搞

太好了大大,这下不用别人的主题了

from pyqt-fluent-widgets.

zhiyiYo avatar zhiyiYo commented on May 18, 2024

已将新版本的包发布到 pypi 了

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.