程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Message popup in Python

編輯:Python

Writing python In the code , Always pop up a window to prompt the information , Because sometimes I use more than one at the same time ui frame , such as tkinter,pyqt etc. , Often can not find the appropriate pop-up module . So I combed several pop-up schemes .

One 、 use windows Self contained api( Import required win32api)

Special emphasis is placed on the adoption of this scheme , The advantage of this scheme is the pop-up mode , The main window is not required .

Two 、 use tkinter The built-in message pop-up module ( Import required tkinter)

You can see , use tkinter The built-in message pop-up module , Create a pop-up window and he , There must be a parent window displayed , This is a very big failure , So unless your project has adopted tkinter Of UI To draw the main window , Otherwise, this pop-up method is not recommended .

3、 ... and 、 use pyqt Message pop-up module ( Import required pyqt)

It can be seen that pyqt We have to introduce a lot of Solutions pyqt Module library for , Declaration initialization must also be passed in widget perhaps window The handle of ࿰


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved