http://blog.sina.com.cn/s/blog_9b78c9110101d9ka.html
设定值:
_________________________________________________
大段文本
self.textEdit.setPlainText(text)
静态label
self.lbl.setText("PyQt4")
设定静态label初始值
self.lbl.setText("hello"+self.singlelineEdit.text())
字体
self.label.setFont(font)
修改颜色
self.label.setStyleSheet("QWidget { background-color: %s }" % color.name())
获取值:
_________________________________________________
单行输入框
self.singlelineEdit.text()
单选radiobox,单选按钮本来就没有value的
self.radiobutton.isCheck()
滑动取值spinbox
self.spinbox.value()
获得日期值
thedate=self.calendarWidget.selectedDate()
日期值转化为string
thedatestring=str(thedate.toPyDate())
下拉列表combobox值的初始化
下拉列表combobox值
self.typecomboBox.currentText()
下拉列表combobox的index
self.typecomboBox.currentIndex()
其他功能:
____________
打开文件: