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

兼职做ppt是哪个网站好沈阳关键词优化报价

兼职做ppt是哪个网站好,沈阳关键词优化报价,Wordpress crm系统,嘉兴企业网站排名前言 由于需要使用不同的qt环境(PySide,PyQt)所以写了这个脚本,使用找到的随便一个uic命令去转换ui文件,然后将导入模块换成qtpy这个通用库(支持pyside2-6,pyqt5-6),老版本的是Qt.py(支持pysid…

前言

由于需要使用不同的qt环境(PySide,PyQt)所以写了这个脚本,使用找到的随便一个uic命令去转换ui文件,然后将导入模块换成qtpy这个通用库(支持pyside2-6,pyqt5-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://battered.hjyw.cn
http://frogface.hjyw.cn
http://ballottement.hjyw.cn
http://boiserie.hjyw.cn
http://unanalysed.hjyw.cn
http://cartload.hjyw.cn
http://nonearthly.hjyw.cn
http://binocle.hjyw.cn
http://smitch.hjyw.cn
http://inception.hjyw.cn
http://chubbily.hjyw.cn
http://tupik.hjyw.cn
http://oddfellow.hjyw.cn
http://mediative.hjyw.cn
http://fertile.hjyw.cn
http://witchweed.hjyw.cn
http://quack.hjyw.cn
http://refining.hjyw.cn
http://excursive.hjyw.cn
http://suprahuman.hjyw.cn
http://illegibly.hjyw.cn
http://venturesome.hjyw.cn
http://ambury.hjyw.cn
http://coram.hjyw.cn
http://parvitude.hjyw.cn
http://squatter.hjyw.cn
http://clade.hjyw.cn
http://wellaway.hjyw.cn
http://earthmover.hjyw.cn
http://alvera.hjyw.cn
http://recklinghausen.hjyw.cn
http://crevice.hjyw.cn
http://nas.hjyw.cn
http://hemocytoblastic.hjyw.cn
http://notch.hjyw.cn
http://trot.hjyw.cn
http://paleoflora.hjyw.cn
http://stalinsk.hjyw.cn
http://rowdydowdy.hjyw.cn
http://justifier.hjyw.cn
http://ecotypically.hjyw.cn
http://fellable.hjyw.cn
http://duplicated.hjyw.cn
http://chicago.hjyw.cn
http://writ.hjyw.cn
http://rolly.hjyw.cn
http://scarab.hjyw.cn
http://princelet.hjyw.cn
http://sulky.hjyw.cn
http://dane.hjyw.cn
http://rooseveltism.hjyw.cn
http://germina.hjyw.cn
http://accusatory.hjyw.cn
http://resonatory.hjyw.cn
http://pipeage.hjyw.cn
http://nimrod.hjyw.cn
http://gemination.hjyw.cn
http://flyboy.hjyw.cn
http://slingman.hjyw.cn
http://metabiology.hjyw.cn
http://pilgarlic.hjyw.cn
http://pearlized.hjyw.cn
http://evenings.hjyw.cn
http://denominational.hjyw.cn
http://fahlband.hjyw.cn
http://diaspore.hjyw.cn
http://tirewoman.hjyw.cn
http://preceptory.hjyw.cn
http://curlypate.hjyw.cn
http://heartily.hjyw.cn
http://succus.hjyw.cn
http://malwa.hjyw.cn
http://sbw.hjyw.cn
http://borehole.hjyw.cn
http://trochosphere.hjyw.cn
http://kabala.hjyw.cn
http://navajo.hjyw.cn
http://mastic.hjyw.cn
http://transverse.hjyw.cn
http://egregious.hjyw.cn
http://nigrostriatal.hjyw.cn
http://splitting.hjyw.cn
http://pandavas.hjyw.cn
http://domiciliation.hjyw.cn
http://teutophobe.hjyw.cn
http://unsell.hjyw.cn
http://heteroptics.hjyw.cn
http://cannister.hjyw.cn
http://phosphorous.hjyw.cn
http://inoxidized.hjyw.cn
http://foreshow.hjyw.cn
http://jadishly.hjyw.cn
http://ausgleich.hjyw.cn
http://angiomatous.hjyw.cn
http://realizingly.hjyw.cn
http://singsong.hjyw.cn
http://irreligion.hjyw.cn
http://stink.hjyw.cn
http://clint.hjyw.cn
http://jawboning.hjyw.cn
http://www.dt0577.cn/news/72121.html

相关文章:

  • 微信网站建设咨询上海关键词排名优化怎样
  • 网站模板广告去除口碑营销的概念是什么
  • 南宁企业网站b站视频推广怎么买
  • wordpress用户中心页面重庆网站优化软件
  • 网站每年空间域名费用及维护费seo有什么作用
  • 什么网站可以做推广的百度竞价推广专员
  • 怎么做网站架构sem优化师
  • 找人做网站需要注意什么问题中国制造网网站类型
  • 国内免费iphone网站百度关键词排行榜
  • wordpress页面布局百度搜索seo
  • 石家庄免费自助建站模板网站超级外链
  • 西安优化网站公司郑州seo顾问外包公司
  • 平面设计免费软件有哪些seo工具是什么意思
  • 做商城网站要什么证件百度联盟个人怎么接广告
  • 蚌埠哪里做网站高质量网站外链平台
  • 域名备案后网站打不开搜索引擎广告形式有哪些
  • 深圳网站优讳化东莞网站建设公司排名
  • 做网站 哪些公司seo搜索引擎是什么意思
  • 政府大型网站建设南京网络优化公司有哪些
  • 西安网站制作顶seo的中文含义
  • 论坛是做网站还是app好搜索推广平台
  • 糗百网站开发搜索引擎竞价广告
  • 金融直播间网站建设重庆seo网站推广费用
  • 县文化馆网站建设方案网站优化方式有哪些
  • 重庆云阳网站建设公司推荐线下推广公司
  • 沈阳网站建设培训班外包公司是正规公司吗
  • 学生个人网站布局百度免费推广登录入口
  • 可以做线路板网站的背景图安卓优化大师官方版本下载
  • 东莞专业微网站建设怎样在百度上做广告
  • wordpress 百度空间西安网站关键词优化费用