资源描述:
《pyside学习教程_计算机软件及应用_it计算机_专业资料》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、PySidetutorialThisisPySidetutorial.Thetutorialissuitedforbeginnersandintermediateprogrammers.Afterreadingthistutorial,youwillbeabletoprogramnontrivialPySideapplications.Tableofcontents·Introduction·Firstprograms·Menusandtoolbars·Layoutmanagement·Eventsandsignals·Dialogs·Widgets·Widge
2、tsII·Drag&drop·Drawing·Customwidgets·TheTetrisgamePySidePySideisPythonlibrarytocreatecross-platformgraphicaluserinterfaces.ItisaPythonbindingtotheQtframework.QtlibraryisoneofthemostpowerfulGUIlibraries.ItisdevelopedbyDigiaandQtProject.TweetRelatedtutorialsThereisafull Pythontutorial
3、onZetCode.TutorialsforotherGUIPythonbindingsinclude PyQt4tutorial, wxPythontutorial, PyGTKtutorial and Tkintertutorial.IntroductiontoPySidetoolkitThisisanintroductoryPySidetutorial.ThepurposeofthistutorialistogetyoustartedwiththePySidetoolkit.ThetutorialhasbeencreatedandtestedonLinux
4、.AboutPySidePySideisPythonlibrarytocreatecross-platformgraphicaluserinterfaces.ItisaPythonbindingtotheQtframework.QtlibraryisoneofthemostpowerfulGUIlibraries.TheofficialhomesiteforPySideis qt-project.org/wiki/PySide.Theinstallationinstructionscanbefoundatpypi.python.org/pypi/PySide.P
5、ySideisimplementedasasetofPythonmodules.Currentlyithas15modules.ThesemodulesprovidepowerfultoolstoworkwithGUI,multimedia,XMLdocuments,networkordatabases.Inourtutorial,wewillworkwithtwoofthesemodules.The QtGui andthe QtCore modules.The QtCore modulecontainsthecorenonGUIfunctionality.T
6、hismoduleisusedforworkingwithtime,filesanddirectories,variousdatatypes,streams,URLs,mimetypes,threadsorprocesses.The QtGui modulecontainsthegraphicalcomponentsandrelatedclasses.Theseincludeforexamplebuttons,windows,statusbars,toolbars,sliders,bitmaps,colours,fontsetc.PySidehasbeenrel
7、easedafterNokia,theowneroftheQttoolkit,failedtoreachanagreementwithRiverbankComputingtoincludetheLGPLasanalternativelicense.PySidehasahighAPIcompatibilitywitPyQt4,somigratingtoPySideisnotdifficult.PythonPythonisageneral-purpose,dynamic,object-orientedprogramminglanguage.Thedesignpurp
8、oseofthePyth