推荐学习书目
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 · Jan 18, 2024 · 4059 views
    This topic created in 859 days ago, the information mentioned may be changed or developed.

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

    这个是代码链接 位于 LyricLabel

    问题

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

    Qt::AlignHCenter Centers horizontally in the available space.
    Qt::AlignJustify Justifies the text in the available space
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1146 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 63ms · UTC 18:16 · PVG 02:16 · LAX 11:16 · JFK 14:16
    ♥ Do have faith in what you're doing.