Guest User

Untitled

a guest
Jul 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. import firebase_admin
  2. from firebase_admin import credentials
  3. from firebase_admin import db
  4.  
  5. cred = credentials.Certificate("2.json")
  6. firebase_admin.initialize_app(cred,{
  7. 'databaseURL':'https://new1-3b819.firebaseio.com/'
  8. })
  9. def funcion(fondo):
  10.  
  11. ref = db.reference('/Imagenes')
  12. r1 = ref.get()
  13. for key in r1.values():
  14. print(str(key))
  15. s = str(key)
  16. fondo.setStyleSheet("background:"+s+";")
  17.  
  18. from PyQt5.QtWidgets import QMainWindow,QApplication
  19. from PyQt5 import uic
  20. from npy import *
  21.  
  22. class Principal(QMainWindow):
  23. def __init__(self):
  24. QMainWindow.__init__(self)
  25. uic.loadUi("im.ui",self)
  26.  
  27. funcion(self.frame)
  28.  
  29.  
  30.  
  31.  
  32. app = QApplication([])
  33. p=Principal()
  34. p.show()
  35. app.exec_()
  36.  
  37. Could not parse stylesheet of object 0x3c88c00
Add Comment
Please, Sign In to add comment