0

I am running the below code and nothing is getting displayed.

Please suggest where I am wrong.

from PyQt4.QtCore import *
from PyQt4.QtGui import *


label = QLabel("<font color = red size = 72><b>" + "Hello" + "</b></font>")
label.setWindowFlags(Qt.SplashScreen)
label.show()
Qtimer.singleShot(6000, app.quit)

I have : python 2.7, PyQt 4.10.4, Qt 5.2.1 and MinGW 4.8

In the Environment Variables, PATH is set as : ;C:\Qt\5.2.1\bin

Could there be some setup issue, as I installed everything and I was trying on few codes and I am facing issues.

Plouff
  • 3,290
  • 2
  • 27
  • 45
Ejaz
  • 1,504
  • 3
  • 25
  • 51
  • 1
    Is this your entire program? If so, you're missing the QApplication instantiation. See http://stackoverflow.com/questions/8762870/how-to-implement-a-simple-button-in-pyqt for an example. – nobody May 18 '14 at 19:31
  • If I don't wish to pass any argument from the command line, then what should I enter in place of sys.argv in : QApplication(sys.argv) ? – Ejaz May 18 '14 at 19:38
  • 1
    Normally you would still pass `sys.argv` and just not give any extra command-line arguments when starting the Python process. – nobody May 18 '14 at 19:42

0 Answers0