일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- Linux
- sqlite
- PyQt5
- ASP
- port
- 라즈베리파이
- tensorflow
- python
- pandas
- Excel
- javascript
- swift
- node.js
- GIT
- PyQt
- urllib
- MySQL
- Unity
- IOS
- 맛집
- flutter
- 다이어트
- mssql
- PER
- 함수
- MS-SQL
- 유니티
- ubuntu
- 리눅스
- 날짜
목록python (161)
아미(아름다운미소)
Python pyqt5 QTableWidget 너비 높이 조정 QTableWidget.setFixedSize(width, height)
PySide : QVBoxLayout의 너비 설정 v_widget = QWidget() v_widget.setLayout(vlayout) v_widget.setFixedWidth(80)
How to display an image onto a PyQT window QLabel은 setPixmap 메서드를 가지고 있기 때문에 이미지를 표시 할 수 있습니다. 예제) lb = QtGui.QLabel(self) pixmap = QtGui.QPixmap("{경로/파일}") height_label = 100 lb.resize(self.width(), height_label) lb.setPixmap(pixmap.scaled(lb.size(), QtCore.Qt.IgnoreAspectRatio)) self.show()
문자열 양끝에 불필요한 공백(스페이스)문자나 탭(Tab) 문자가 붙어 있다면, 그것을 지우는 방법입니다. strip() 메소드(함수)를 사용합니다. 그러나 문자열 속에 포함되어 있는 공백은 몇 개든 상관없이 그대로 둡니다. 문자열 앞과 끝의 공백 문자 모두 제거 예제: Trim # -*- coding: utf-8 -*- s = ' AAA BBB CCC ' s = s.strip() print('[%s]' % (s)) 결과 : [AAA BBB CCC] 문자열의 앞과 끝에 붙어 있던 공백 문자들이 모두 사라지고 깨끗이 정리되었습니다.
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 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..