Note that there are some explanatory texts on larger screens.

plurals
  1. POPython 3 PyQT (Using Designer), having issues starting
    primarykey
    data
    text
    <p>I am trying to branch out into developing a program with a GUI, and since I like KDE a lot I figured I would give PyQT a shot. Here's an example of what I have so far (no logic just yet, I wanted to see if I could get the UI to display).</p> <p>Here is the UI file named at.ui</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;ui version="4.0"&gt; &lt;class&gt;MainWindow&lt;/class&gt; &lt;widget class="QMainWindow" name="MainWindow"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;0&lt;/x&gt; &lt;y&gt;0&lt;/y&gt; &lt;width&gt;410&lt;/width&gt; &lt;height&gt;322&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="windowTitle"&gt; &lt;string&gt;MainWindow&lt;/string&gt; &lt;/property&gt; &lt;widget class="QWidget" name="centralwidget"&gt; &lt;widget class="QTabWidget" name="tabWidget"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;0&lt;/x&gt; &lt;y&gt;10&lt;/y&gt; &lt;width&gt;261&lt;/width&gt; &lt;height&gt;271&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="tabPosition"&gt; &lt;enum&gt;QTabWidget::North&lt;/enum&gt; &lt;/property&gt; &lt;property name="tabShape"&gt; &lt;enum&gt;QTabWidget::Rounded&lt;/enum&gt; &lt;/property&gt; &lt;property name="currentIndex"&gt; &lt;number&gt;2&lt;/number&gt; &lt;/property&gt; &lt;property name="tabsClosable"&gt; &lt;bool&gt;false&lt;/bool&gt; &lt;/property&gt; &lt;widget class="QWidget" name="tab"&gt; &lt;attribute name="title"&gt; &lt;string&gt;Information&lt;/string&gt; &lt;/attribute&gt; &lt;widget class="QWidget" name="formLayoutWidget"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;0&lt;/x&gt; &lt;y&gt;0&lt;/y&gt; &lt;width&gt;251&lt;/width&gt; &lt;height&gt;111&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;layout class="QFormLayout" name="formLayout"&gt; &lt;item row="0" column="0"&gt; &lt;widget class="QLabel" name="jobNameLabel"&gt; &lt;property name="text"&gt; &lt;string&gt;Job Name&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/item&gt; &lt;item row="0" column="1"&gt; &lt;widget class="QLineEdit" name="jobNameLineEdit"/&gt; &lt;/item&gt; &lt;item row="1" column="0"&gt; &lt;widget class="QLabel" name="inputDirectoryLabel"&gt; &lt;property name="text"&gt; &lt;string&gt;Input Directory&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/item&gt; &lt;item row="1" column="1"&gt; &lt;widget class="QLineEdit" name="inputDirectoryLineEdit"/&gt; &lt;/item&gt; &lt;item row="2" column="0"&gt; &lt;widget class="QLabel" name="albumNameLabel"&gt; &lt;property name="text"&gt; &lt;string&gt;Album Name&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/item&gt; &lt;item row="2" column="1"&gt; &lt;widget class="QLineEdit" name="albumNameLineEdit"/&gt; &lt;/item&gt; &lt;item row="3" column="0"&gt; &lt;widget class="QLabel" name="scalingAmountLabel"&gt; &lt;property name="text"&gt; &lt;string&gt;Scaling Amount&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/item&gt; &lt;item row="3" column="1"&gt; &lt;widget class="QComboBox" name="scalingAmountComboBox"&gt; &lt;property name="sizePolicy"&gt; &lt;sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed"&gt; &lt;horstretch&gt;0&lt;/horstretch&gt; &lt;verstretch&gt;0&lt;/verstretch&gt; &lt;/sizepolicy&gt; &lt;/property&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;10% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;20% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;30% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;40% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;50% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;60% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;70% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;80% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;90% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;item&gt; &lt;property name="text"&gt; &lt;string&gt;100% of Original&lt;/string&gt; &lt;/property&gt; &lt;/item&gt; &lt;/widget&gt; &lt;/item&gt; &lt;/layout&gt; &lt;/widget&gt; &lt;widget class="QTextEdit" name="textEdit"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;3&lt;/x&gt; &lt;y&gt;130&lt;/y&gt; &lt;width&gt;251&lt;/width&gt; &lt;height&gt;111&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QLabel" name="label_3"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;10&lt;/x&gt; &lt;y&gt;110&lt;/y&gt; &lt;width&gt;53&lt;/width&gt; &lt;height&gt;14&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Notes&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/widget&gt; &lt;widget class="QWidget" name="tab_2"&gt; &lt;attribute name="title"&gt; &lt;string&gt;Manual&lt;/string&gt; &lt;/attribute&gt; &lt;widget class="QPushButton" name="pushButton_5"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;30&lt;/x&gt; &lt;y&gt;120&lt;/y&gt; &lt;width&gt;181&lt;/width&gt; &lt;height&gt;25&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Step 1 (Copy Images)&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QPushButton" name="pushButton_4"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;30&lt;/x&gt; &lt;y&gt;150&lt;/y&gt; &lt;width&gt;181&lt;/width&gt; &lt;height&gt;25&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Step 2 (Resize Images)&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QPushButton" name="pushButton_3"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;30&lt;/x&gt; &lt;y&gt;180&lt;/y&gt; &lt;width&gt;181&lt;/width&gt; &lt;height&gt;25&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Step 3 (Upload Images)&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QPushButton" name="pushButton_2"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;30&lt;/x&gt; &lt;y&gt;210&lt;/y&gt; &lt;width&gt;181&lt;/width&gt; &lt;height&gt;25&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Step 4 (Manage Album)&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QLabel" name="label_2"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;10&lt;/x&gt; &lt;y&gt;10&lt;/y&gt; &lt;width&gt;241&lt;/width&gt; &lt;height&gt;61&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="frameShape"&gt; &lt;enum&gt;QFrame::NoFrame&lt;/enum&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;This is the manual method of uploading your images. Complete all four steps and you'll be done!&lt;/string&gt; &lt;/property&gt; &lt;property name="wordWrap"&gt; &lt;bool&gt;true&lt;/bool&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/widget&gt; &lt;widget class="QWidget" name="tab_3"&gt; &lt;attribute name="title"&gt; &lt;string&gt;Automatic&lt;/string&gt; &lt;/attribute&gt; &lt;widget class="QPushButton" name="pushButton_6"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;10&lt;/x&gt; &lt;y&gt;170&lt;/y&gt; &lt;width&gt;231&lt;/width&gt; &lt;height&gt;61&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Express Mode&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QLabel" name="label"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;10&lt;/x&gt; &lt;y&gt;10&lt;/y&gt; &lt;width&gt;241&lt;/width&gt; &lt;height&gt;61&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="frameShape"&gt; &lt;enum&gt;QFrame::NoFrame&lt;/enum&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;This is the automatic method of uploading your images. Clicking the 'Express Mode' button will finish the entire process for you.&lt;/string&gt; &lt;/property&gt; &lt;property name="wordWrap"&gt; &lt;bool&gt;true&lt;/bool&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/widget&gt; &lt;/widget&gt; &lt;widget class="QPushButton" name="pushButton"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;270&lt;/x&gt; &lt;y&gt;250&lt;/y&gt; &lt;width&gt;131&lt;/width&gt; &lt;height&gt;25&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Exit&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QLabel" name="label_4"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;270&lt;/x&gt; &lt;y&gt;0&lt;/y&gt; &lt;width&gt;131&lt;/width&gt; &lt;height&gt;81&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;First, fill out the fields in the Information tab. Next, choose either Manual or Automatic processing.&lt;/string&gt; &lt;/property&gt; &lt;property name="wordWrap"&gt; &lt;bool&gt;true&lt;/bool&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QLabel" name="label_5"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;270&lt;/x&gt; &lt;y&gt;80&lt;/y&gt; &lt;width&gt;131&lt;/width&gt; &lt;height&gt;101&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;There are additional tools and options available in the menubar. If you need any assistance, check out the Help menu for more information!&lt;/string&gt; &lt;/property&gt; &lt;property name="wordWrap"&gt; &lt;bool&gt;true&lt;/bool&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QPushButton" name="pushButton_7"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;270&lt;/x&gt; &lt;y&gt;220&lt;/y&gt; &lt;width&gt;131&lt;/width&gt; &lt;height&gt;25&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Export&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QPushButton" name="pushButton_8"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;270&lt;/x&gt; &lt;y&gt;190&lt;/y&gt; &lt;width&gt;131&lt;/width&gt; &lt;height&gt;25&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;property name="text"&gt; &lt;string&gt;Import&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;/widget&gt; &lt;widget class="QMenuBar" name="menubar"&gt; &lt;property name="geometry"&gt; &lt;rect&gt; &lt;x&gt;0&lt;/x&gt; &lt;y&gt;0&lt;/y&gt; &lt;width&gt;410&lt;/width&gt; &lt;height&gt;21&lt;/height&gt; &lt;/rect&gt; &lt;/property&gt; &lt;widget class="QMenu" name="menuFileFile"&gt; &lt;property name="title"&gt; &lt;string&gt;File&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QMenu" name="menuTools"&gt; &lt;property name="title"&gt; &lt;string&gt;Tools&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;widget class="QMenu" name="menuHelp"&gt; &lt;property name="title"&gt; &lt;string&gt;Help&lt;/string&gt; &lt;/property&gt; &lt;/widget&gt; &lt;addaction name="menuFileFile"/&gt; &lt;addaction name="menuTools"/&gt; &lt;addaction name="menuHelp"/&gt; &lt;/widget&gt; &lt;widget class="QStatusBar" name="statusbar"/&gt; &lt;/widget&gt; &lt;resources/&gt; &lt;connections/&gt; &lt;/ui&gt; </code></pre> <p>I used pyuic to compile it into Python code and got the following, named at_auto.py:</p> <pre><code>#!/usr/bin/python3 # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'QT/at.ui' # # Created: Thu Feb 9 14:05:42 2012 # by: PyQt4 UI code generator 4.9 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except AttributeError: _fromUtf8 = lambda s: s class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName(_fromUtf8("MainWindow")) MainWindow.resize(410, 322) self.centralwidget = QtGui.QWidget(MainWindow) self.centralwidget.setObjectName(_fromUtf8("centralwidget")) self.tabWidget = QtGui.QTabWidget(self.centralwidget) self.tabWidget.setGeometry(QtCore.QRect(0, 10, 261, 271)) self.tabWidget.setTabPosition(QtGui.QTabWidget.North) self.tabWidget.setTabShape(QtGui.QTabWidget.Rounded) self.tabWidget.setTabsClosable(False) self.tabWidget.setObjectName(_fromUtf8("tabWidget")) self.tab = QtGui.QWidget() self.tab.setObjectName(_fromUtf8("tab")) self.formLayoutWidget = QtGui.QWidget(self.tab) self.formLayoutWidget.setGeometry(QtCore.QRect(0, 0, 251, 111)) self.formLayoutWidget.setObjectName(_fromUtf8("formLayoutWidget")) self.formLayout = QtGui.QFormLayout(self.formLayoutWidget) self.formLayout.setMargin(0) self.formLayout.setObjectName(_fromUtf8("formLayout")) self.jobNameLabel = QtGui.QLabel(self.formLayoutWidget) self.jobNameLabel.setObjectName(_fromUtf8("jobNameLabel")) self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.jobNameLabel) self.jobNameLineEdit = QtGui.QLineEdit(self.formLayoutWidget) self.jobNameLineEdit.setObjectName(_fromUtf8("jobNameLineEdit")) self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.jobNameLineEdit) self.inputDirectoryLabel = QtGui.QLabel(self.formLayoutWidget) self.inputDirectoryLabel.setObjectName(_fromUtf8("inputDirectoryLabel")) self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.inputDirectoryLabel) self.inputDirectoryLineEdit = QtGui.QLineEdit(self.formLayoutWidget) self.inputDirectoryLineEdit.setObjectName(_fromUtf8("inputDirectoryLineEdit")) self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.inputDirectoryLineEdit) self.albumNameLabel = QtGui.QLabel(self.formLayoutWidget) self.albumNameLabel.setObjectName(_fromUtf8("albumNameLabel")) self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.albumNameLabel) self.albumNameLineEdit = QtGui.QLineEdit(self.formLayoutWidget) self.albumNameLineEdit.setObjectName(_fromUtf8("albumNameLineEdit")) self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.albumNameLineEdit) self.scalingAmountLabel = QtGui.QLabel(self.formLayoutWidget) self.scalingAmountLabel.setObjectName(_fromUtf8("scalingAmountLabel")) self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.scalingAmountLabel) self.scalingAmountComboBox = QtGui.QComboBox(self.formLayoutWidget) sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.MinimumExpanding, QtGui.QSizePolicy.Fixed) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth(self.scalingAmountComboBox.sizePolicy().hasHeightForWidth()) self.scalingAmountComboBox.setSizePolicy(sizePolicy) self.scalingAmountComboBox.setObjectName(_fromUtf8("scalingAmountComboBox")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.scalingAmountComboBox.addItem(_fromUtf8("")) self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.scalingAmountComboBox) self.textEdit = QtGui.QTextEdit(self.tab) self.textEdit.setGeometry(QtCore.QRect(3, 130, 251, 111)) self.textEdit.setObjectName(_fromUtf8("textEdit")) self.label_3 = QtGui.QLabel(self.tab) self.label_3.setGeometry(QtCore.QRect(10, 110, 53, 14)) self.label_3.setObjectName(_fromUtf8("label_3")) self.tabWidget.addTab(self.tab, _fromUtf8("")) self.tab_2 = QtGui.QWidget() self.tab_2.setObjectName(_fromUtf8("tab_2")) self.pushButton_5 = QtGui.QPushButton(self.tab_2) self.pushButton_5.setGeometry(QtCore.QRect(30, 120, 181, 25)) self.pushButton_5.setObjectName(_fromUtf8("pushButton_5")) self.pushButton_4 = QtGui.QPushButton(self.tab_2) self.pushButton_4.setGeometry(QtCore.QRect(30, 150, 181, 25)) self.pushButton_4.setObjectName(_fromUtf8("pushButton_4")) self.pushButton_3 = QtGui.QPushButton(self.tab_2) self.pushButton_3.setGeometry(QtCore.QRect(30, 180, 181, 25)) self.pushButton_3.setObjectName(_fromUtf8("pushButton_3")) self.pushButton_2 = QtGui.QPushButton(self.tab_2) self.pushButton_2.setGeometry(QtCore.QRect(30, 210, 181, 25)) self.pushButton_2.setObjectName(_fromUtf8("pushButton_2")) self.label_2 = QtGui.QLabel(self.tab_2) self.label_2.setGeometry(QtCore.QRect(10, 10, 241, 61)) self.label_2.setFrameShape(QtGui.QFrame.NoFrame) self.label_2.setWordWrap(True) self.label_2.setObjectName(_fromUtf8("label_2")) self.tabWidget.addTab(self.tab_2, _fromUtf8("")) self.tab_3 = QtGui.QWidget() self.tab_3.setObjectName(_fromUtf8("tab_3")) self.pushButton_6 = QtGui.QPushButton(self.tab_3) self.pushButton_6.setGeometry(QtCore.QRect(10, 170, 231, 61)) self.pushButton_6.setObjectName(_fromUtf8("pushButton_6")) self.label = QtGui.QLabel(self.tab_3) self.label.setGeometry(QtCore.QRect(10, 10, 241, 61)) self.label.setFrameShape(QtGui.QFrame.NoFrame) self.label.setWordWrap(True) self.label.setObjectName(_fromUtf8("label")) self.tabWidget.addTab(self.tab_3, _fromUtf8("")) self.pushButton = QtGui.QPushButton(self.centralwidget) self.pushButton.setGeometry(QtCore.QRect(270, 250, 131, 25)) self.pushButton.setObjectName(_fromUtf8("pushButton")) self.label_4 = QtGui.QLabel(self.centralwidget) self.label_4.setGeometry(QtCore.QRect(270, 0, 131, 81)) self.label_4.setWordWrap(True) self.label_4.setObjectName(_fromUtf8("label_4")) self.label_5 = QtGui.QLabel(self.centralwidget) self.label_5.setGeometry(QtCore.QRect(270, 80, 131, 101)) self.label_5.setWordWrap(True) self.label_5.setObjectName(_fromUtf8("label_5")) self.pushButton_7 = QtGui.QPushButton(self.centralwidget) self.pushButton_7.setGeometry(QtCore.QRect(270, 220, 131, 25)) self.pushButton_7.setObjectName(_fromUtf8("pushButton_7")) self.pushButton_8 = QtGui.QPushButton(self.centralwidget) self.pushButton_8.setGeometry(QtCore.QRect(270, 190, 131, 25)) self.pushButton_8.setObjectName(_fromUtf8("pushButton_8")) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtGui.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 410, 21)) self.menubar.setObjectName(_fromUtf8("menubar")) self.menuFileFile = QtGui.QMenu(self.menubar) self.menuFileFile.setObjectName(_fromUtf8("menuFileFile")) self.menuTools = QtGui.QMenu(self.menubar) self.menuTools.setObjectName(_fromUtf8("menuTools")) self.menuHelp = QtGui.QMenu(self.menubar) self.menuHelp.setObjectName(_fromUtf8("menuHelp")) MainWindow.setMenuBar(self.menubar) self.statusbar = QtGui.QStatusBar(MainWindow) self.statusbar.setObjectName(_fromUtf8("statusbar")) MainWindow.setStatusBar(self.statusbar) self.menubar.addAction(self.menuFileFile.menuAction()) self.menubar.addAction(self.menuTools.menuAction()) self.menubar.addAction(self.menuHelp.menuAction()) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(2) QtCore.QMetaObject.connectSlotsByName(MainWindow) def retranslateUi(self, MainWindow): MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8)) self.jobNameLabel.setText(QtGui.QApplication.translate("MainWindow", "Job Name", None, QtGui.QApplication.UnicodeUTF8)) self.inputDirectoryLabel.setText(QtGui.QApplication.translate("MainWindow", "Input Directory", None, QtGui.QApplication.UnicodeUTF8)) self.albumNameLabel.setText(QtGui.QApplication.translate("MainWindow", "Album Name", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountLabel.setText(QtGui.QApplication.translate("MainWindow", "Scaling Amount", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "10% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(1, QtGui.QApplication.translate("MainWindow", "20% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(2, QtGui.QApplication.translate("MainWindow", "30% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(3, QtGui.QApplication.translate("MainWindow", "40% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(4, QtGui.QApplication.translate("MainWindow", "50% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(5, QtGui.QApplication.translate("MainWindow", "60% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(6, QtGui.QApplication.translate("MainWindow", "70% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(7, QtGui.QApplication.translate("MainWindow", "80% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(8, QtGui.QApplication.translate("MainWindow", "90% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.scalingAmountComboBox.setItemText(9, QtGui.QApplication.translate("MainWindow", "100% of Original", None, QtGui.QApplication.UnicodeUTF8)) self.label_3.setText(QtGui.QApplication.translate("MainWindow", "Notes", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab), QtGui.QApplication.translate("MainWindow", "Information", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_5.setText(QtGui.QApplication.translate("MainWindow", "Step 1 (Copy Images)", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_4.setText(QtGui.QApplication.translate("MainWindow", "Step 2 (Resize Images)", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_3.setText(QtGui.QApplication.translate("MainWindow", "Step 3 (Upload Images)", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_2.setText(QtGui.QApplication.translate("MainWindow", "Step 4 (Manage Album)", None, QtGui.QApplication.UnicodeUTF8)) self.label_2.setText(QtGui.QApplication.translate("MainWindow", "This is the manual method of uploading your images. Complete all four steps and you\'ll be done!", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), QtGui.QApplication.translate("MainWindow", "Manual", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_6.setText(QtGui.QApplication.translate("MainWindow", "Express Mode", None, QtGui.QApplication.UnicodeUTF8)) self.label.setText(QtGui.QApplication.translate("MainWindow", "This is the automatic method of uploading your images. Clicking the \'Express Mode\' button will finish the entire process for you.", None, QtGui.QApplication.UnicodeUTF8)) self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_3), QtGui.QApplication.translate("MainWindow", "Automatic", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton.setText(QtGui.QApplication.translate("MainWindow", "Exit", None, QtGui.QApplication.UnicodeUTF8)) self.label_4.setText(QtGui.QApplication.translate("MainWindow", "First, fill out the fields in the Information tab. Next, choose either Manual or Automatic processing.", None, QtGui.QApplication.UnicodeUTF8)) self.label_5.setText(QtGui.QApplication.translate("MainWindow", "There are additional tools and options available in the menubar. If you need any assistance, check out the Help menu for more information!", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_7.setText(QtGui.QApplication.translate("MainWindow", "Export", None, QtGui.QApplication.UnicodeUTF8)) self.pushButton_8.setText(QtGui.QApplication.translate("MainWindow", "Import", None, QtGui.QApplication.UnicodeUTF8)) self.menuFileFile.setTitle(QtGui.QApplication.translate("MainWindow", "File", None, QtGui.QApplication.UnicodeUTF8)) self.menuTools.setTitle(QtGui.QApplication.translate("MainWindow", "Tools", None, QtGui.QApplication.UnicodeUTF8)) self.menuHelp.setTitle(QtGui.QApplication.translate("MainWindow", "Help", None, QtGui.QApplication.UnicodeUTF8)) </code></pre> <p>The Python script to start it is:</p> <pre><code>#!/usr/bin/python3 from PyQt4 import QtGui, QtCore import at_auto, os class at(at_auto): def __init__(self): at_auto.__init__(self) if __name__ == '__main__': import sys a = QtGui.QApplication(sys.argv) QtCore.QObject.connect(a, QtCore.SIGNAL('lastWindowClosed()'), a, QtCore.SLOT('quit()')) w = at(at_auto.__init__(self)) a.setMainWindow(w) w.show() a.exec_loop() </code></pre> <p>When attempting to run the program, I get the following error:</p> <pre><code>Traceback (most recent call last): File "./at.py", line 6, in &lt;module&gt; class at(at_auto): TypeError: module.__init__() takes at most 2 arguments (3 given) </code></pre> <p>I modified the code in at.py from the following tutorial:</p> <p><a href="http://wiki.python.org/moin/JonathanGardnerPyQtTutorial#Using_pyuic" rel="nofollow">http://wiki.python.org/moin/JonathanGardnerPyQtTutorial#Using_pyuic</a></p> <p>Thank you so much!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload