当前位置: 首页 > news >正文

网站开发软件开发怎么样做网站的企业文化怎么写

网站开发软件开发怎么样,做网站的企业文化怎么写,营销型网站分类,怎么在百度上发布信息广告前言 由于需要使用不同的qt环境#xff08;PySide#xff0c;PyQt#xff09;所以写了这个脚本#xff0c;使用找到的随便一个uic命令去转换ui文件#xff0c;然后将导入模块换成qtpy这个通用库(支持pyside2-6#xff0c;pyqt5-6)#xff0c;老版本的是Qt.py(支持pysid…前言 由于需要使用不同的qt环境PySidePyQt所以写了这个脚本使用找到的随便一个uic命令去转换ui文件然后将导入模块换成qtpy这个通用库(支持pyside2-6pyqt5-6)老版本的是Qt.py(支持pyside0-2~pyqt4-5)你可以自己改 使用 将内容保存为 ui2py.ps1 放置到后缀 ui 文件的同目录下 在拥有环境的powershell中运行 .\ui2py # .SYNOPSIS Convert all ui files in the same directory to py files for Python to use.DESCRIPTION It needs to be used on terminals that have a Python environment, making sure that pyuic* or pyside*-uic is present This script replaces the import from PyQt* or from PySide* in the py file with the from qtpy module after compilation.EXAMPLE PS .\MyScript.ps1 Run directly, no parameters required.LINK https://blog.csdn.net/weixin_42579717/article/details/137279306# # Check whether the uic command exists $_commands (pyuic5, pyside2-uic, pyuic6, pyside6-uic, pyside-uic, pyuic) $command $null foreach ($cmd in $_commands) {$command Get-Command $cmd -ErrorAction SilentlyContinueif ($command){break} } if (-not$command) {Write-Host Command not found.exit 1 } $command $command.Name Write-Output Use command: $command# Gets the folder where the current script is located $scriptDirectory Split-Path -Parent $MyInvocation.MyCommand.Definition# Perform conversion operations for all *.ui files in the folder Get-ChildItem -Path $scriptDirectory -Filter *.ui | ForEach-Object {$uiFile $_.FullName$pyFile $_.BaseName .py$pyFilePath Join-Path $scriptDirectory $pyFileWrite-Host $uiFileWrite-Host $pyFilePath# Convert .ui to .py $command -o $pyFilePath $uiFile# Check whether the file is successfully convertedif (Test-Path $pyFilePath){# Replace import module(Get-Content $pyFilePath -Encoding UTF8) -replace from (PyQt[456]?|PySide[26]?), from qtpy | Set-Content $pyFilePath -Encoding UTF8Write-Host Files have been converted and modified successfully: $pyFile}else{Write-Host convert failed: $uiFile} }如果你的项目是有结构的比如下图 需要将ui转出的py文件放置到上层的ui目录中的话可以修改以下内容 添加父文件夹$parentDirectory Split-Path -Parent $scriptDirectory # Gets the folder where the current script is located $scriptDirectory Split-Path -Parent $MyInvocation.MyCommand.Definition $parentDirectory Split-Path -Parent $scriptDirectory# Perform conversion operations for all *.ui files in the folder Get-ChildItem -Path $scriptDirectory -Filter *.ui | ForEach-Object {$uiFile $_.FullName$pyFile $_.BaseName .py$pyFilePath Join-Path $parentDirectory (ui/ $pyFile)PS qrc转py同理 可以看看另一篇文章 qrc2py
http://www.eeditor.cn/news/124672/

相关文章:

  • 免费网站建设免费咨询全校网站建设与管理
  • 珠海专业医疗网站建设黄桃图片友情链接
  • 温岭网站开发网页制作与前端开发
  • 网站建设收费标准报价西安做网站公司哪家好 应该怎么选择
  • 公司网站如何做水印建设隔离变压器移动网站
  • 长春可做微网站的公司游戏网站建设项目规划书案例
  • 杭州下沙做网站的论坛设计本官方网站下载
  • 可克达拉市建设局网站唯艾迪 wordpress
  • 做网站哪个比较好适合这手机浏览器主页的网站
  • 重庆品牌服装网站建设婚恋网站建设技巧
  • 网站被恶意关键字访问对招聘公司做评价的网站
  • 求推荐专门做借条的网站个人网站怎么做详情页
  • 公司网站注册要多少钱怎么制作公众号小程序
  • 教育网站wordpress 煎蛋网插件
  • 佛山外贸网站建设价位第一站长网
  • idc网站模板查看一下测绘项目招投标信息
  • 微网站开发技巧关注城市建设网站
  • c 网站开发环境宝安区简介
  • 网站地图开发健康咨询类网站模板
  • php 网站cookie宿迁网站建设开发
  • 移动网站建设制作公司重庆丰标建设网站
  • 苏州建设交通学校网站昆明网站建设网站
  • 南宁手机网站建设万网官网
  • wordpress多站点文章调用静安微信手机网站制作
  • 中小型网站建设行情北京门头沟山洪暴发
  • 租赁商城手机网站开发房产网站流量排名
  • 网站建设发展历程虚拟机安装 wordpress
  • 定制网站建设建立公司官网
  • 贵州门户网站建设建设部安全员证书查询网站
  • 做能收款的网站多少钱对网站专业性建设_宣传推广设计整体改进方案