# -*- coding:utf-8 -*- import sys from PyQt5 import QtCore from PyQt5.QtWidgets import QCalendarWidget, QLabel, QDialog class CalendarDialog(QDialog): def __init__(self, _parent): super(CalendarDialog, self).__init__(_parent) self.setModal(True) self.cal = QCalendarWidget(self) self.initUI() self.adjustSize() self.setFixedSize(self.width(), self.height()) self.selectedDate = None def initUI(self): self.cal.setGridVisible(True) self.cal.move(20, 20) self.cal.clicked[QtCore.QDate].connect(self.showDate) self.lbl = QLabel(self) date = self.cal.selectedDate() self.lbl.setText(date.toString()) self.lbl.move(20, 200) self.setWindowTitle('Calendar') self.show() def showDate(self, date): self.lbl.setText(date.toString()) self.close() def main(): app = QApplication(sys.argv) ex = Example() sys.exit(app.exec_()) if __name__ == '__main__': main()
2018년 11월 21일 수요일
[QGIS3] QCalendarWidget
피드 구독하기:
댓글 (Atom)
[python] subprocess
proc.py import asyncio from argparse import ArgumentParser from asyncio import sleep async def process_function(user, file_path): if use...
-
용량이 큰 파일 업로드 시 net::ERR_CONNECTION_RESET 오류 발생할 경우. http_server = tornado.httpserver.HTTPServer(app, max_buffer_size=10485760000) upload_for...
-
특정 시그널에 연결 되어 있는지를 확인 def isSignalConnected(_obj, signal_name): metaObj = _obj.metaObject() for i in range(metaObj.methodC...
-
class Program { static void Main(String[] args) { string zipPath = "..."; string extractPath = Path.G...
댓글 없음:
댓글 쓰기