일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- MySQL
- 날짜
- Excel
- 다이어트
- Unity
- tensorflow
- ASP
- urllib
- javascript
- mssql
- 라즈베리파이
- PER
- pandas
- sqlite
- port
- 리눅스
- node.js
- IOS
- python
- PyQt
- 유니티
- Linux
- 맛집
- PyQt5
- flutter
- swift
- GIT
- MS-SQL
- ubuntu
- 함수
목록랭귀지/python (239)
아미(아름다운미소)
QTableWidget의 특정 셀을 읽기 전용으로 만들려면,플래그를 변경하여 셀의 동작 / 속성을 변경합니다 item = QTableWidgetItem() item.setFlags(item.flags() ^ Qt.ItemIsEditable) tableName.setItem(row, column, item)
Python PyQt5 선택한 날짜에 setStyleSheet backgroundcolor #33ccff 적용 ''' Created on 2018. 12. 19. @author: bhm ''' from PyQt5 import QtWidgets QSS = ''' QCalendarWidget QAbstractItemView { selection-background-color: #33ccff; selection-color: white; } ''' class CalendarWidget(QtWidgets.QCalendarWidget): def __init__(self, parent=None): super(CalendarWidget, self).__init__(parent, verticalHeaderFormat=Q..
Python PyQt How to convert from Python to QDate style 2018-12-19 -> 2018 12 19 변경 qtDate = QtCore.QDate.fromString(myPythonicDate, 'yyyy-MM-dd') print(qtDate.year(), qtDate.month(), qtDate.day()) 결과 : 2018 12 19
Python pyqt tableWidget double click event #-*- coding: utf-8 -*- self.tableWidget.doubleClicked.connect(self.tableWidget_doubleClicked) def treeMedia_doubleClicked(self): row = self.tableWidget.currentIndex().row() column = self.tableWidget.currentIndex().column() print(row, column)
PyQt에서 QCalendarWidget을 사용하여 날짜선택하기 def selectDates(self): self.dateWindow = QWidget() self.cal = QCalendarWidget(self) self.cal.clicked[QtCore.QDate].connect(self.showDate) self.hbox = QHBoxLayout() self.hbox.addWidget(self.cal) self.dateWindow.setLayout(self.hbox) self.dateWindow.setGeometry(300, 300, 350, 300) self.dateWindow.setWindowTitle('Calendar') self.dateWindow.show() def showDate(self..
PyQt5 messagebox# -*- coding: utf-8 -*- import sys from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QMessageBox from PyQt5.QtGui import QIcon from PyQt5.QtCore import pyqtSlot class App(QWidget): def __init__(self): super().__init__() self.title = 'PyQt5 messagebox' self.left = 10 self.top = 10 self.width = 320 self.height = 200 self.initUI() def initUI(self): self.setWindowTitle(..
Python PyQt5 QtSql 사용예 #-*- coding: utf-8 -*- from PyQt5 import QtSql def run(): database = QtSql.QSqlDatabase.addDatabase('QSQLITE') database.setDatabaseName("analyze.db") if not database.open(): print("Database Error", "Unable To Connect To The Database!") stop() else: print("select") query = QtSql.QSqlQuery("SELECT * FROM BPS") rec = query.record() while query.next(): for i in range(rec.count..
Python PyQt5 click action on Qwidget ''' Created on 2018. 12. 10. @author: bhm ''' from PyQt5.QtWidgets import (QWidget, QApplication) import sys class MyWidget(QWidget): def mousePressEvent(self, event): print("clicked") app = QApplication(sys.argv) widget = MyWidget() widget.show() app.exec_()
PyQt5 QInputDialog 다이얼로그팝업 #-*- coding: utf-8 -*- ''' Created on 2018. 12. 10. @author: bhm ''' from PyQt5.QtWidgets import (QInputDialog, QApplication) app = QApplication([]) dialog = QInputDialog() dialog.show() app.exec_()
Python PyQt5 submenu Python PyQt5 서브메뉴 예제 # -*- coding: utf-8 -*- import sys from PyQt5.QtWidgets import QMainWindow, QAction, QMenu, QApplication class Example(QMainWindow): def __init__(self): super().__init__() self.initUI() def initUI(self): menubar = self.menuBar() fileMenu = menubar.addMenu('파일') impMenu = QMenu('열기', self) impAct = QAction('서브메뉴열기', self) impMenu.addAction(impAct) newAct ..