파일 - 기본 설정 - 사용자 코드 조각
{
// Place your PyQt5_Excel 작업 영역 snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"PyQt5": {
"scope": "python",
"prefix": "pyqt5",
"body": [
"import sys",
"from PyQt5.QtWidgets import *",
"",
"class MyApp(QWidget):",
" def __init__(self):",
" super().__init__()",
" self.window_width, self.window_height = 700, 500",
" self.resize(self.window_width, self.window_height)",
" self.title = '$1'",
"",
" self.InitUI()",
"",
" def InitUI(self):",
" self.setWindowTitle(self.title)",
"",
"if __name__ == '__main__':",
" app = QApplication(sys.argv)",
" myApp = MyApp()",
" myApp.show()",
"",
" try:",
" sys.exit(app.exec())",
" except SystemExit:",
" print('Closing Window...')"
],
"description": "Python PyQt5"
}
}
'컴퓨터 > Python' 카테고리의 다른 글
python 인쇄 (0) | 2022.06.10 |
---|---|
python pyqt5 list to listwidget (0) | 2022.06.09 |
python clipboard 파일복사 이미지 보내기 (0) | 2022.06.07 |
python 새로 시작된 창 이름 인덱스 (0) | 2022.06.06 |
pip freeze 가상환경 쉽게 배포하기 (0) | 2022.06.05 |