资源描述:
《pyside学习教程》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、PySidetutorialThisisPySidetutorial.Thetutorialissuitedforbeginnersandintermediateprogrammers.Afterreadingthistutorial,youwillbeabletoprogramnontrivialPySideapplications.Tableofcontents·Introduction·Firstprograms·Menusandtoolbars·Layoutmanagement·Eventsandsignals·Dialogs·Widge
2、ts·WidgetsII·Drag&drop·Drawing·Customwidgets·TheTetrisgamePySidePySideisPythonlibrarytocreatecross-platformgraphicaluserinterfaces.ItisaPythonbindingtotheQtframework.QtlibraryisoneofthemostpowerfulGUIlibraries.ItisdevelopedbyDigiaandQtProject.TweetRelatedtutorialsThereisafull
3、 Pythontutorial onZetCode.TutorialsforotherGUIPythonbindingsinclude PyQt4tutorial, wxPythontutorial, PyGTKtutorial and Tkintertutorial.IntroductiontoPySidetoolkitThisisanintroductoryPySidetutorial.ThepurposeofthistutorialistogetyoustartedwiththePySidetoolkit.Thetutorialhasbee
4、ncreatedandtestedonLinux.AboutPySidePySideisPythonlibrarytocreatecross-platformgraphicaluserinterfaces.ItisaPythonbindingtotheQtframework.QtlibraryisoneofthemostpowerfulGUIlibraries.TheofficialhomesiteforPySideis qt-project.org/wiki/PySide.Theinstallationinstructionscanbefoun
5、datpypi.python.org/pypi/PySide.PySideisimplementedasasetofPythonmodules.Currentlyithas15modules.ThesemodulesprovidepowerfultoolstoworkwithGUI,multimedia,XMLdocuments,networkordatabases.Inourtutorial,wewillworkwithtwoofthesemodules.The QtGui andthe QtCore modules.The QtCore mo
6、dulecontainsthecorenonGUIfunctionality.Thismoduleisusedforworkingwithtime,filesanddirectories,variousdatatypes,streams,URLs,mimetypes,threadsorprocesses.The QtGui modulecontainsthegraphicalcomponentsandrelatedclasses.Theseincludeforexamplebuttons,windows,statusbars,toolbars,s
7、liders,bitmaps,colours,fontsetc.PySidehasbeenreleasedafterNokia,theowneroftheQttoolkit,failedtoreachanagreementwithRiverbankComputingtoincludetheLGPLasanalternativelicense.PySidehasahighAPIcompatibilitywitPyQt4,somigratingtoPySideisnotdifficult.PythonPythonisageneral-purpose,
8、dynamic,object-orientedprogramminglanguage.ThedesignpurposeofthePyth