Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Théo BOUTEMY
siam
Commits
87259520
Commit
87259520
authored
May 30, 2021
by
Pauline LEYRIT
Browse files
boite de dialogue + vainqueurs
parent
2423470b
Changes
1
Hide whitespace changes
Inline
Side-by-side
appli2.py
View file @
87259520
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment