On Wed, 28 Dec 2011 19:30:10 +0200, ad...@mbnoimi.net wrote:
> On 21/12/2011 07:12 م, Phil Thompson wrote:  
> On Wed, 21 Dec 2011 19:03:56 +0200, ad...@mbnoimi.net [1] wrote:
> 
> On 10/12/2011 03:15 م, Phil Thompson wrote: 
> On Sat, 10 Dec 2011 12:55:09 +0200, ad...@mbnoimi.net [2] [1] wrote:
> 
> On 10/12/2011 12:47 م, Phil Thompson wrote: I think there might be a
> pyuic4 regression related to retranslation. What version were you using
> that seemed to work? Can you send me a .ui file that seems to have the
> problem? 
> 
>  By the way, I didn't face this problem with C++/Qt for same Qt version
> 
> Thanks - will be fixed in tonight's snapshot.
>  Did you fixed it? if yes is there any binary distro (I still unable to
> build snapshot on Windows :-( )?
> 
> I said I'd fixed it. There will be a new binary release later this week.
> 
> Phil
> 
> This issue still exist in current version (PyQt-Py2.7-x86-gpl-4.9-1)

Then that implies that there is a second problem. Attached is the pyuic4
output from your .ui file. You need to provide a short complete test that
demonstrates any outstanding problem.

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

# Form implementation generated from reading ui file 'login.ui'
#
# Created: Thu Dec 29 10:06:41 2011
#      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_LoginDialog(object):
    def setupUi(self, LoginDialog):
        LoginDialog.setObjectName(_fromUtf8("LoginDialog"))
        LoginDialog.setWindowModality(QtCore.Qt.WindowModal)
        LoginDialog.resize(337, 308)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(LoginDialog.sizePolicy().hasHeightForWidth())
        LoginDialog.setSizePolicy(sizePolicy)
        LoginDialog.setMinimumSize(QtCore.QSize(200, 0))
        LoginDialog.setMaximumSize(QtCore.QSize(449, 16777215))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        LoginDialog.setWindowIcon(icon)
        self.verticalLayout_2 = QtGui.QVBoxLayout(LoginDialog)
        self.verticalLayout_2.setSpacing(1)
        self.verticalLayout_2.setMargin(1)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.stackedWidget = QtGui.QStackedWidget(LoginDialog)
        self.stackedWidget.setObjectName(_fromUtf8("stackedWidget"))
        self.page = QtGui.QWidget()
        self.page.setObjectName(_fromUtf8("page"))
        self.verticalLayout = QtGui.QVBoxLayout(self.page)
        self.verticalLayout.setSpacing(1)
        self.verticalLayout.setMargin(1)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label_login = QtGui.QLabel(self.page)
        self.label_login.setPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/login.png")))
        self.label_login.setScaledContents(True)
        self.label_login.setObjectName(_fromUtf8("label_login"))
        self.verticalLayout.addWidget(self.label_login)
        self.gridlayout = QtGui.QGridLayout()
        self.gridlayout.setMargin(5)
        self.gridlayout.setSpacing(6)
        self.gridlayout.setObjectName(_fromUtf8("gridlayout"))
        self.uiUserName = QtGui.QLineEdit(self.page)
        self.uiUserName.setObjectName(_fromUtf8("uiUserName"))
        self.gridlayout.addWidget(self.uiUserName, 0, 1, 1, 1)
        self.label_4 = QtGui.QLabel(self.page)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_4.sizePolicy().hasHeightForWidth())
        self.label_4.setSizePolicy(sizePolicy)
        self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_4.setObjectName(_fromUtf8("label_4"))
        self.gridlayout.addWidget(self.label_4, 1, 0, 1, 1)
        self.uiPassword = QtGui.QLineEdit(self.page)
        self.uiPassword.setEchoMode(QtGui.QLineEdit.Password)
        self.uiPassword.setObjectName(_fromUtf8("uiPassword"))
        self.gridlayout.addWidget(self.uiPassword, 1, 1, 1, 1)
        self.label_3 = QtGui.QLabel(self.page)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth())
        self.label_3.setSizePolicy(sizePolicy)
        self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridlayout.addWidget(self.label_3, 0, 0, 1, 1)
        self.verticalLayout.addLayout(self.gridlayout)
        self.horizontalLayout_4 = QtGui.QHBoxLayout()
        self.horizontalLayout_4.setSizeConstraint(QtGui.QLayout.SetDefaultConstraint)
        self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4"))
        self.toolButton_arabic = QtGui.QToolButton(self.page)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolButton_arabic.sizePolicy().hasHeightForWidth())
        self.toolButton_arabic.setSizePolicy(sizePolicy)
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/flagsyria.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton_arabic.setIcon(icon1)
        self.toolButton_arabic.setIconSize(QtCore.QSize(56, 56))
        self.toolButton_arabic.setCheckable(True)
        self.toolButton_arabic.setAutoExclusive(True)
        self.toolButton_arabic.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        self.toolButton_arabic.setObjectName(_fromUtf8("toolButton_arabic"))
        self.horizontalLayout_4.addWidget(self.toolButton_arabic)
        self.toolButton_english = QtGui.QToolButton(self.page)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolButton_english.sizePolicy().hasHeightForWidth())
        self.toolButton_english.setSizePolicy(sizePolicy)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/flagenglish.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton_english.setIcon(icon2)
        self.toolButton_english.setIconSize(QtCore.QSize(56, 56))
        self.toolButton_english.setCheckable(True)
        self.toolButton_english.setChecked(True)
        self.toolButton_english.setAutoExclusive(True)
        self.toolButton_english.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        self.toolButton_english.setObjectName(_fromUtf8("toolButton_english"))
        self.horizontalLayout_4.addWidget(self.toolButton_english)
        self.toolButton_turkish = QtGui.QToolButton(self.page)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.toolButton_turkish.sizePolicy().hasHeightForWidth())
        self.toolButton_turkish.setSizePolicy(sizePolicy)
        icon3 = QtGui.QIcon()
        icon3.addPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/flagturkey.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.toolButton_turkish.setIcon(icon3)
        self.toolButton_turkish.setIconSize(QtCore.QSize(56, 56))
        self.toolButton_turkish.setCheckable(True)
        self.toolButton_turkish.setAutoExclusive(True)
        self.toolButton_turkish.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly)
        self.toolButton_turkish.setObjectName(_fromUtf8("toolButton_turkish"))
        self.horizontalLayout_4.addWidget(self.toolButton_turkish)
        self.verticalLayout.addLayout(self.horizontalLayout_4)
        self.hboxlayout = QtGui.QHBoxLayout()
        self.hboxlayout.setSpacing(6)
        self.hboxlayout.setContentsMargins(0, 5, 0, 0)
        self.hboxlayout.setObjectName(_fromUtf8("hboxlayout"))
        self.pushAccept = QtGui.QPushButton(self.page)
        icon4 = QtGui.QIcon()
        icon4.addPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/ok.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushAccept.setIcon(icon4)
        self.pushAccept.setDefault(True)
        self.pushAccept.setObjectName(_fromUtf8("pushAccept"))
        self.hboxlayout.addWidget(self.pushAccept)
        self.pushCancel = QtGui.QPushButton(self.page)
        icon5 = QtGui.QIcon()
        icon5.addPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/cancel.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushCancel.setIcon(icon5)
        self.pushCancel.setObjectName(_fromUtf8("pushCancel"))
        self.hboxlayout.addWidget(self.pushCancel)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.hboxlayout.addItem(spacerItem)
        self.pushChange = QtGui.QPushButton(self.page)
        icon6 = QtGui.QIcon()
        icon6.addPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/configure.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushChange.setIcon(icon6)
        self.pushChange.setObjectName(_fromUtf8("pushChange"))
        self.hboxlayout.addWidget(self.pushChange)
        self.verticalLayout.addLayout(self.hboxlayout)
        self.stackedWidget.addWidget(self.page)
        self.page_2 = QtGui.QWidget()
        self.page_2.setObjectName(_fromUtf8("page_2"))
        self.verticalLayout_3 = QtGui.QVBoxLayout(self.page_2)
        self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(self.page_2)
        self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.uiServer = QtGui.QLineEdit(self.page_2)
        self.uiServer.setEnabled(False)
        self.uiServer.setFocusPolicy(QtCore.Qt.NoFocus)
        self.uiServer.setReadOnly(True)
        self.uiServer.setObjectName(_fromUtf8("uiServer"))
        self.horizontalLayout_3.addWidget(self.uiServer)
        self.gridLayout.addLayout(self.horizontalLayout_3, 0, 1, 1, 1)
        self.label_2 = QtGui.QLabel(self.page_2)
        self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        self.uiDatabase = QtGui.QComboBox(self.page_2)
        self.uiDatabase.setObjectName(_fromUtf8("uiDatabase"))
        self.horizontalLayout_2.addWidget(self.uiDatabase)
        self.uiTextDatabase = QtGui.QLineEdit(self.page_2)
        self.uiTextDatabase.setObjectName(_fromUtf8("uiTextDatabase"))
        self.horizontalLayout_2.addWidget(self.uiTextDatabase)
        self.pushCreateDatabase = QtGui.QPushButton(self.page_2)
        icon7 = QtGui.QIcon()
        icon7.addPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/new.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushCreateDatabase.setIcon(icon7)
        self.pushCreateDatabase.setObjectName(_fromUtf8("pushCreateDatabase"))
        self.horizontalLayout_2.addWidget(self.pushCreateDatabase)
        self.pushRestoreDatabase = QtGui.QPushButton(self.page_2)
        icon8 = QtGui.QIcon()
        icon8.addPixmap(QtGui.QPixmap(_fromUtf8(":/ui/images/redo.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.pushRestoreDatabase.setIcon(icon8)
        self.pushRestoreDatabase.setObjectName(_fromUtf8("pushRestoreDatabase"))
        self.horizontalLayout_2.addWidget(self.pushRestoreDatabase)
        self.gridLayout.addLayout(self.horizontalLayout_2, 1, 1, 1, 1)
        self.verticalLayout_3.addLayout(self.gridLayout)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        spacerItem1 = QtGui.QSpacerItem(17, 17, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem1)
        self.uiNoConnection = QtGui.QLabel(self.page_2)
        self.uiNoConnection.setAlignment(QtCore.Qt.AlignCenter)
        self.uiNoConnection.setObjectName(_fromUtf8("uiNoConnection"))
        self.horizontalLayout.addWidget(self.uiNoConnection)
        spacerItem2 = QtGui.QSpacerItem(17, 17, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem2)
        self.verticalLayout_3.addLayout(self.horizontalLayout)
        self.stackedWidget.addWidget(self.page_2)
        self.verticalLayout_2.addWidget(self.stackedWidget)
        self.label_4.setBuddy(self.uiPassword)
        self.label_3.setBuddy(self.uiUserName)
        self.label.setBuddy(self.pushChange)
        self.label_2.setBuddy(self.uiDatabase)

        self.retranslateUi(LoginDialog)
        self.stackedWidget.setCurrentIndex(0)
        QtCore.QMetaObject.connectSlotsByName(LoginDialog)
        LoginDialog.setTabOrder(self.uiUserName, self.uiPassword)
        LoginDialog.setTabOrder(self.uiPassword, self.toolButton_english)
        LoginDialog.setTabOrder(self.toolButton_english, self.pushAccept)
        LoginDialog.setTabOrder(self.pushAccept, self.uiTextDatabase)
        LoginDialog.setTabOrder(self.uiTextDatabase, self.pushCreateDatabase)
        LoginDialog.setTabOrder(self.pushCreateDatabase, self.pushRestoreDatabase)
        LoginDialog.setTabOrder(self.pushRestoreDatabase, self.uiDatabase)
        LoginDialog.setTabOrder(self.uiDatabase, self.toolButton_arabic)
        LoginDialog.setTabOrder(self.toolButton_arabic, self.pushCancel)
        LoginDialog.setTabOrder(self.pushCancel, self.toolButton_turkish)
        LoginDialog.setTabOrder(self.toolButton_turkish, self.pushChange)

    def retranslateUi(self, LoginDialog):
        LoginDialog.setWindowTitle(QtGui.QApplication.translate("LoginDialog", "Login", None, QtGui.QApplication.UnicodeUTF8))
        self.label_4.setText(QtGui.QApplication.translate("LoginDialog", "&Password:", None, QtGui.QApplication.UnicodeUTF8))
        self.label_3.setText(QtGui.QApplication.translate("LoginDialog", "&Username:", None, QtGui.QApplication.UnicodeUTF8))
        self.toolButton_arabic.setText(QtGui.QApplication.translate("LoginDialog", "&ط¹ظ€ظ€ط±ط¨ظ€ظ€ظٹ", None, QtGui.QApplication.UnicodeUTF8))
        self.toolButton_english.setText(QtGui.QApplication.translate("LoginDialog", "&English", None, QtGui.QApplication.UnicodeUTF8))
        self.toolButton_turkish.setText(QtGui.QApplication.translate("LoginDialog", "Tأ¼rkأ§e", None, QtGui.QApplication.UnicodeUTF8))
        self.pushAccept.setText(QtGui.QApplication.translate("LoginDialog", "Login", None, QtGui.QApplication.UnicodeUTF8))
        self.pushCancel.setText(QtGui.QApplication.translate("LoginDialog", "Close", None, QtGui.QApplication.UnicodeUTF8))
        self.pushChange.setText(QtGui.QApplication.translate("LoginDialog", "Options", None, QtGui.QApplication.UnicodeUTF8))
        self.label.setText(QtGui.QApplication.translate("LoginDialog", "&Server:", None, QtGui.QApplication.UnicodeUTF8))
        self.label_2.setText(QtGui.QApplication.translate("LoginDialog", "&Database:", None, QtGui.QApplication.UnicodeUTF8))
        self.pushCreateDatabase.setText(QtGui.QApplication.translate("LoginDialog", "Create &Database", None, QtGui.QApplication.UnicodeUTF8))
        self.pushRestoreDatabase.setText(QtGui.QApplication.translate("LoginDialog", "&Restore Database", None, QtGui.QApplication.UnicodeUTF8))
        self.uiNoConnection.setText(QtGui.QApplication.translate("LoginDialog", "<b>Could not connect to server !</b>", None, QtGui.QApplication.UnicodeUTF8))

import common_rc

if __name__ == "__main__":
    import sys
    app = QtGui.QApplication(sys.argv)
    LoginDialog = QtGui.QDialog()
    ui = Ui_LoginDialog()
    ui.setupUi(LoginDialog)
    LoginDialog.show()
    sys.exit(app.exec_())

_______________________________________________
PyQt mailing list    PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to