1

I am install on Nexus 5 QPython and trying run this code:

import pygame

size = width, height = 400, 400

window = pygame.display.set_mode(size)
pygame.display.set_caption('hello, pygame!')

screen = pygame.Surface((400,400))

done = True
while done:
  for e in pygame.event.get():
    if e.type == pygame.QUIT:
      done = False
  screen.fill((0,255,0))

  window.blit(screen, (0,0))
  pygame.display.flip()

after run, i am see this: enter image description here

but, if i am rinning this code onto PC, thats OK

1 Answer 1

0

QPython 2.4.2 You need to add

#-*-coding:utf8;-*-
#qpy:pygame

as the first and second line to include the qpython version of pygame if the problem persists please try to add your qpython version and interpreter version

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.