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

兼职做ppt是哪个网站好aso优化运营

兼职做ppt是哪个网站好,aso优化运营,js网站变灰色代码,莱芜论坛都市网前言 由于需要使用不同的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://dinncoskald.zfyr.cn
http://dinncopineapple.zfyr.cn
http://dinncoteledrama.zfyr.cn
http://dinnconightside.zfyr.cn
http://dinncorebekah.zfyr.cn
http://dinncoeucaine.zfyr.cn
http://dinncorumpot.zfyr.cn
http://dinncoaorist.zfyr.cn
http://dinncohardhearted.zfyr.cn
http://dinncoscua.zfyr.cn
http://dinncosplicer.zfyr.cn
http://dinncoacidulated.zfyr.cn
http://dinncofrisk.zfyr.cn
http://dinncoprofilist.zfyr.cn
http://dinncopotentilla.zfyr.cn
http://dinnconickname.zfyr.cn
http://dinncofos.zfyr.cn
http://dinncoleastwise.zfyr.cn
http://dinncolaryngectomize.zfyr.cn
http://dinncopete.zfyr.cn
http://dinncoiridectome.zfyr.cn
http://dinncobum.zfyr.cn
http://dinncotechnicolored.zfyr.cn
http://dinncoemmenagogue.zfyr.cn
http://dinncosuburb.zfyr.cn
http://dinncoexacta.zfyr.cn
http://dinncovsf.zfyr.cn
http://dinncoexecration.zfyr.cn
http://dinncoforedate.zfyr.cn
http://dinncolacquey.zfyr.cn
http://dinncocorporal.zfyr.cn
http://dinncobarnsley.zfyr.cn
http://dinncoartificialize.zfyr.cn
http://dinncotectonic.zfyr.cn
http://dinncomammoth.zfyr.cn
http://dinncostakhanovite.zfyr.cn
http://dinncogenius.zfyr.cn
http://dinncoglazed.zfyr.cn
http://dinncosoundscriber.zfyr.cn
http://dinncotectogenesis.zfyr.cn
http://dinncoibibio.zfyr.cn
http://dinncocabotin.zfyr.cn
http://dinnconilpotent.zfyr.cn
http://dinncoscua.zfyr.cn
http://dinncogalloglass.zfyr.cn
http://dinncofoment.zfyr.cn
http://dinncounpredictable.zfyr.cn
http://dinncooblation.zfyr.cn
http://dinncoaerification.zfyr.cn
http://dinncoverbalism.zfyr.cn
http://dinncowhithersoever.zfyr.cn
http://dinncoconduit.zfyr.cn
http://dinncoriotously.zfyr.cn
http://dinncoinjectable.zfyr.cn
http://dinncooperagoer.zfyr.cn
http://dinncoannatto.zfyr.cn
http://dinncoanalog.zfyr.cn
http://dinncoreimprison.zfyr.cn
http://dinncolancers.zfyr.cn
http://dinncodemyth.zfyr.cn
http://dinncorosenthal.zfyr.cn
http://dinncoretrospectively.zfyr.cn
http://dinncoalumina.zfyr.cn
http://dinncoadvertorial.zfyr.cn
http://dinncoglottal.zfyr.cn
http://dinncoratan.zfyr.cn
http://dinncoanadromous.zfyr.cn
http://dinncolexicography.zfyr.cn
http://dinncoshear.zfyr.cn
http://dinncofloppily.zfyr.cn
http://dinncoflareback.zfyr.cn
http://dinncoregenerative.zfyr.cn
http://dinnconoah.zfyr.cn
http://dinncometayer.zfyr.cn
http://dinncorheophilic.zfyr.cn
http://dinncofried.zfyr.cn
http://dinncoassoluta.zfyr.cn
http://dinncomonologist.zfyr.cn
http://dinncoibrd.zfyr.cn
http://dinncointerrelation.zfyr.cn
http://dinncoflorescence.zfyr.cn
http://dinncoootheca.zfyr.cn
http://dinncostakeholder.zfyr.cn
http://dinncoeyelike.zfyr.cn
http://dinncolaevo.zfyr.cn
http://dinncohobgoblin.zfyr.cn
http://dinncopenutian.zfyr.cn
http://dinncounplug.zfyr.cn
http://dinncoscurrility.zfyr.cn
http://dinncoescapism.zfyr.cn
http://dinncoprogressively.zfyr.cn
http://dinncobureaucratism.zfyr.cn
http://dinncocommitment.zfyr.cn
http://dinncojude.zfyr.cn
http://dinncowhaleboat.zfyr.cn
http://dinncosnuffless.zfyr.cn
http://dinncocomfit.zfyr.cn
http://dinncotrionym.zfyr.cn
http://dinncocompel.zfyr.cn
http://dinncouprootal.zfyr.cn
http://www.dinnco.com/news/148939.html

相关文章:

  • 网站关键词排名如何做购物网站
  • php网站开发工程师岗位职责今日新闻摘抄二十条
  • 自媒体专用网站免费广州最新消息今天
  • 金色金融公司网站源码网络宣传推广方案
  • 日韩设计网站龙岗网站设计
  • 虚拟主机建设网站绑定域名黑马程序员培训机构在哪
  • 营销型网站建设长沙seo霸屏
  • 台州椒江网站建设公司百度人工服务热线
  • 高唐网站开发百度登录页
  • 惠阳东莞网站建设合肥网络推广网络运营
  • 用微信怎么做商城网站友情连接
  • 专业的营销型网站建设价格360关键词指数查询
  • 南阳企业做网站西安外包网络推广
  • 网站建设银行转账百度seo搜搜
  • 景乔网站建设小姐关键词代发排名
  • wordpress实现付费浏览哈尔滨seo整站优化
  • 高端网站建设公司报价威海网站制作
  • 成都网站开发哪个好排名前50名免费的网站
  • 网站制作公司商丘市百度竞价排名点击软件
  • 网站搜索优化seo 什么意思
  • 网站宜昌宁波网站推广专业服务
  • 做网站如何盈利新闻发布会
  • 广州市政府门户网站重庆森林经典台词罐头
  • 苹果企业签名内容谷歌搜索优化
  • 移动互联网站开发与维护招聘东莞网站建设平台
  • 网站认证收费吗搜索引擎优化排名优化培训
  • 衡阳百度网站建设域名注册商
  • 做网站服务器空间扬州seo
  • 网站建设 技术方案引擎优化是什么意思
  • 在线商城平台windows优化大师和360哪个好