Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. How can I show pinyin on top of characters using PySide?
Forum Updated to NodeBB v4.3 + New Features

How can I show pinyin on top of characters using PySide?

Scheduled Pinned Locked Moved Unsolved Qt for Python
pysidepythonqt for python
1 Posts 1 Posters 445 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Seafoodhater
    wrote on last edited by
    #1

    f11765b7-c751-413b-a0ef-cbbc1f22c1f7-image.png

    I have a string of Chinese characters and their respective pinyin. Is there any way I can display them as text like in the image above with PySide?

    I have tried something like this for the CSS part:

    span {
        display: inline-block;
        text-align: center;
    }
    

    As for the HTML part:

    <span>wǒ<br>我</span><span>ài<br>爱</span><span>nǐ<br>你</span>
    

    AFAIK, PyQt does not have full CSS support so the inline-block method does not work. Please correct me if I am wrong. Thank you!

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved