Programme Python qui affiche des messages GUI sur Ubuntu
Télécharger la bibliothèque GUI
sudo apt-get install python-qt4
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
class UI(QMainWindow):
def __init__(self):
super(UI, self).__init__()
self.initUI()
def initUI(self):
# Warning Message box
QMessageBox.warning(self, "Message", u"something wrong")
self.show()
def main():
app = QApplication(sys.argv)
ui = UI()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
URL de référence http://myenigma.hatenablog.com/entry/2016/01/24/113413
Recommended Posts