• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
金色洋光
学习是最好的投资
博客园    首页    新随笔    联系   管理     
2018年4月27日
qtCreate默认窗口为英文,设置成中文
摘要: QTranslator myTranslator; bool nBool = myTranslator.load("qt_zh_CN.qm",":/");//名字 路径 qDebug()<<"加载中文:"<<nBool; a.installTranslator(&myTranslator); 对应的 阅读全文
posted @ 2018-04-27 15:41 金色洋光 阅读(1183) 评论(0) 推荐(0)
QT程序加载本地的文字库(字体格式 .ttc或.ttf)
摘要: int nfontId = QFontDatabase::addApplicationFont(":/锐字锐线梦想黑简V1.0.TTF");qDebug()<<"fontId = "<< nfontId;//等于-1加载失败if(nfontId>=0){ QString msyh = QFontDa 阅读全文
posted @ 2018-04-27 15:33 金色洋光 阅读(1063) 评论(0) 推荐(0)
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3