R
R
Rishat Sultanov2016-11-30 15:43:49
Python
Rishat Sultanov, 2016-11-30 15:43:49

Why doesn't it display anything on the screen when compiling and running the code?

Good afternoon, ladies and gentlemen.
I'm climbing here in PyQT Designer and I've made a thing.
I wanted to overtake it all in py format.
Overtook.
I'm trying to run it in PyCharm but I can't see anything. There are no errors either.
Python 2.7 PyQT4
Code:

# -*- coding: utf-8 -*-

# Form implementation generated from reading ui file 'other.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!

from PyQt4 import QtCore, QtGui

try:
    _fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
    def _fromUtf8(s):
        return s

try:
    _encoding = QtGui.QApplication.UnicodeUTF8
    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
    def _translate(context, text, disambig):
        return QtGui.QApplication.translate(context, text, disambig)

class Ui_Form(object):
    def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(400, 300)
        self.dial = QtGui.QDial(Form)
        self.dial.setGeometry(QtCore.QRect(140, 100, 50, 64))
        self.dial.setObjectName(_fromUtf8("dial"))

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

    def retranslateUi(self, Form):
        Form.setWindowTitle(_translate("Form", "Form", None))

a289e00a.jpg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
abcd0x00, 2016-12-03
@rishatss

From this form, then it is necessary to inherit in your application so that it takes the form of this form. You don't need to run it yourself. Read some tutorials to get started.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question