Source Code for Me (s-c.me)

Allows you to paste souce code to blogs! Adapted for Twitter! Here is Search Form in case you missed your code.
Tags: Python,childWindow,setupUi,retranslateUi,toUtf,init, Created At: 10/24/2016 8:16:18 PMViews:

HTML view:
Copy Source | Copy HTML
  1. # -*- coding: utf-8 -*-
  2. from PyQt4 import QtCore, QtGui
  3.  
  4. class childWindow(object):
  5.     def setupUi(self, SmallWindow):
  6.         SmallWindow.setFixedSize(330, 200)
  7.         SmallWindow.setWindowFlags(QtCore.Qt.Window)
  8.         self.retranslateUi(SmallWindow)
  9.         SmallWindow.setWindowModality(QtCore.Qt.WindowModal)
  10.  
  11.     def retranslateUi(self, Form):
  12.         Form.setWindowTitle(self.toUtf("Я - Ð´Ð¾Ñ‡ÐµÑ€Ð½ÐµÐµ Ð¾ÐºÐ½Ð¾"))
  13.  
  14.     def toUtf(self, text):
  15.         return QtGui.QApplication.translate("SmallWindow", text, None, QtGui.QApplication.UnicodeUTF8)
  16.  
  17. def init(parentwindow):
  18.     SmallWindow = QtGui.QWidget(parentwindow)
  19.     form = childWindow()
  20.     form.setupUi(SmallWindow)
  21.     return form, SmallWindow

Based on Manoli.Net's CodeFormatter. Made by Topbot (c) 2008-2017