Skip to content

Commit

Permalink
Added final image
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarohurtadobo committed Jun 21, 2018
1 parent c104bd1 commit b4b2897
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(self,fila,pantallaTotal = True,parent=None):
#print('Agregado: ',self.listaPreguntas[-1])
#print('Total: ',self.listaPreguntas)
self.estadoActual = 0
self.maximoNuemeroPreguntas = len(self.listaPreguntas)

self.thread.start()
self.connect(self.thread,QtCore.SIGNAL("INTRODUCI_CARACTER"),self.actualizarTexto)
Expand All @@ -87,6 +88,7 @@ def initUI(self):
self.intro = QtGui.QLineEdit('')
self.pregunta = QtGui.QLabel()
self.layoutTotalHorizontal = QtGui.QHBoxLayout()
self.layoutGanador = QtGui.QHBoxLayout()

self.imagenIzquierdaLayout = QtGui.QVBoxLayout()
self.preguntasDerechaLayout = QtGui.QVBoxLayout()
Expand Down Expand Up @@ -163,7 +165,13 @@ def revisarRespuesta(self):
if self.intro.text() == self.listaPreguntas[self.estadoActual][2]:
print(' Correcta')
self.estadoActual += 1
self.actualizarLayout()
if self.estadoActual == self.maximoNuemeroPreguntas:
self.pixmapAct = QtGui.QPixmap('./database/0.png')
self.imagen.setPixmap(self.pixmapAct)
self.layoutGanador.setWidget(self.imagen)
self.setLayout(self.layoutGanador)
else:
self.actualizarLayout()
else:
print(' Incorrecta')

Expand Down

0 comments on commit b4b2897

Please sign in to comment.