Giter VIP home page Giter VIP logo

Comments (3)

qingsuijiu avatar qingsuijiu commented on May 28, 2024

已解决,pip install Pyside6==6.2.2,但显示的字部分是乱码,左边的图标也只有三个

from howtrader.

qingsuijiu avatar qingsuijiu commented on May 28, 2024

字体问题:可能是相应的字体包,我的电脑没有,故对源码做出以下更改:
howtrader-3.3.0-py3.9.egg\howtrader\trader\ui\qt.py 文件
def create_qapp(app_name: str = "Howtrader") -> QtWidgets.QApplication 函数更改为:

`def create_qapp(app_name: str = "Howtrader") -> QtWidgets.QApplication:
"""
Create Qt Application.
"""
# Set up dark stylesheet
qapp: QtWidgets.QApplication = QtWidgets.QApplication(sys.argv)
qapp.setStyleSheet(qdarkstyle.load_stylesheet(qt_api="pyside6"))

# Set up font
font: QtGui.QFont = QtGui.QFont(SETTINGS["font.family"], SETTINGS["font.size"])
font.setFamily('微软雅黑')  #字体
qapp.setFont(font)

# Set up icon
icon: QtGui.QIcon = QtGui.QIcon(get_icon_path(__file__, "vnpy.ico"))
qapp.setWindowIcon(icon)
# ........`

主要是加了一句font.setFamily('微软雅黑') #将字体做一个修改

左边的图标:
好像可以在main.py中配置,有几行被注释掉了

from howtrader.

51bitquant avatar 51bitquant commented on May 28, 2024

如果发现界面出现乱码或者字体出错的话,可以在howtrader 文件夹里面的vt_setting.json文件中增加font.family的键值对

{
  "font.family": "Times New Roman"

}

或者把Times New Roman 改成你系统中的字体。

from howtrader.

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.