V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
ghhccghk
V2EX  ›  Python

一个 pyside6 ui 的小问题

  •  
  •   ghhccghk ·
    ghhccghk · 99 天前 · 2214 次点击
    这是一个创建于 99 天前的主题,其中的信息可能已经有所发展或是发生改变。

    我想让这个歌词从中心点往两边散开,该如何处理

    这个是代码链接 位于 LyricLabel

    问题

    4 条回复    2024-01-19 01:07:32 +08:00
    kneo
        1
    kneo  
       99 天前 via Android   ❤️ 1
    你们看明白他想要啥了吗?
    ghhccghk
        2
    ghhccghk  
    OP
       99 天前
    @kneo 我的意思想在歌词变长变短的时候能保持在之前显示的中心点,可能讲不明白
    kneo
        3
    kneo  
       99 天前 via Android
    居中对齐?你可能要把文本框的宽度设置为和外层容器宽度一样,或者把文本框本身的位置设置为对外层容器居中对齐(不知道支不支持)。
    NoOneNoBody
        4
    NoOneNoBody  
       99 天前
    代码太长,懒得看

    Qt::AlignHCenter Centers horizontally in the available space.
    Qt::AlignJustify Justifies the text in the available space
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2789 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:02 · PVG 20:02 · LAX 05:02 · JFK 08:02
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.