Commit 87259520 authored by Pauline LEYRIT's avatar Pauline LEYRIT
Browse files

boite de dialogue + vainqueurs

parent 2423470b
# from PyQt5.QtCore import Qt
# from PyQt5.QtGui import QBrush
# from PyQt5.QtWidgets import QApplication, QGraphicsScene,QGraphicsView, QGraphicsRectItem, QPushButton,QInputDialog
# import sys
#
# app = QApplication(sys.argv)
#
# # def de la scene
# scene = QGraphicsScene()
# rectGris1 = QGraphicsRectItem(0., 0., 200., 150.)
# rectGris1.setBrush(QBrush(Qt.lightGray))
# boutton_entrer = QPushButton("entrer")
#
# scene.addItem(rectGris1)
# scene.
#
# #def vue
# vue = QGraphicsView(scene)
# vue.resize(800,600)
# vue.fitInView(rectGris1, button_entrer, Qt.KeepAspectRatio)
# vue.show()
#
# sys.exit(app.exec_())
#
from PyQt5.QtWidgets import *
......@@ -94,6 +70,7 @@ class Window(QMainWindow):
self.scene = QGraphicsScene(self)
self.zone_txt = QGraphicsScene(self)
plateau = QPixmap('plateau9x7.PNG')
......@@ -257,13 +234,24 @@ class Window(QMainWindow):
#scene.addText("Codeloop.org", QFont("Sanserif", 15))
#rect.setFlag(QGraphicsItem.ItemIsMovable)
self.view = QGraphicsView(self.scene, self)
#self.view.setGeometry(0, 0, 640, 440)
self.view.resize(self.p.width()+100, self.p.height()+100)
self.texte = self.zone_txt.addText('Bienvenue dans le Royaume de Siam !'
'les éléphants et les rhinocéros vont saffronter, le joueur 1, celui qui commencera, sera les éléphants (en vert)'
self.view2 = QGraphicsView(self.zone_txt, self)
self.view2.setGeometry(720, 300, 400, 400)
self.texte.setPos(700, 250)
self.show()
def joueur1(self):
self.joueur_qg = self.liste_el_qg # demander qqui est le premier joueur
self.joueur = self.ele
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment