标签:blog http io 2014 for ar amp window
from PyQt4 import QtGui
from PyQt4 import QtCore
from PyQt4.QtCore import pyqtSlot,SIGNAL,SLOT
import sys
class myTabWidget(QtGui.QTabWidget):
def tabChangedSlot(self,argTabIndex):
QtGui.QMessageBox.information(self,"Tab Index Changed!",
"Current Tab Index: "+QtCore.QString.number(argTabIndex));
def main():
app = QtGui.QApplication(sys.argv)
tabWidget = myTabWidget()
tabWidget.addTab(QtGui.QWidget(),"1");
tabWidget.addTab(QtGui.QWidget(),"2");
tabWidget.addTab(QtGui.QWidget(),"3");
#Resize width and height
tabWidget.resize(300,120)
tabWidget.setWindowTitle(‘QTabWidget Changed Example‘)
tabWidget.connect(tabWidget,
SIGNAL("currentChanged(int)"),tabWidget,SLOT("tabChangedSlot(int)"))
tabWidget.show()
sys.exit(app.exec_())
if __name__ == ‘__main__‘:
main()
图片如下:
pyqt tabWidget例子学习1,布布扣,bubuko.com
标签:blog http io 2014 for ar amp window
原文地址:http://www.cnblogs.com/mhxy13867806343/p/3873976.html