diff --git a/default/Dockerfile b/default/Dockerfile index bbd6c86..3f79735 100644 --- a/default/Dockerfile +++ b/default/Dockerfile @@ -10,7 +10,7 @@ RUN adduser --quiet --disabled-password qtuser && usermod -a -G audio qtuser # This fix: libGL error: No matching fbConfigs or visuals found ENV LIBGL_ALWAYS_INDIRECT=1 -# Install Python 3, PyQt5 -RUN apt-get update && apt-get install -y python3-pyqt5 +# Install Python 3, PyQt5, chinese fonts support +RUN apt-get update && apt-get install -y python3-pyqt5 fonts-wqy-zenhei COPY hello.py /tmp/hello.py diff --git a/default/hello.py b/default/hello.py index be9b5e0..7e7bdea 100644 --- a/default/hello.py +++ b/default/hello.py @@ -11,7 +11,7 @@ w.setWindowTitle("My First Qt App") # Add a label with tooltip - label = QLabel("Hello World", w) + label = QLabel("Hello World\n你好 世界", w) label.setToolTip("This is a QLabel widget with Tooltip") label.resize(label.sizeHint()) label.move(80, 50) diff --git a/qml/Dockerfile b/qml/Dockerfile index 526b44f..5144960 100644 --- a/qml/Dockerfile +++ b/qml/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update && apt-get install -y \ gstreamer1.0-plugins-good \ gstreamer1.0-plugins-ugly \ alsa-base \ - alsa-utils + alsa-utils \ + fonts-wqy-zenhei COPY hello.* /tmp/