RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 669658 - PyQt binding have no some functions from Qt 4.6
Summary: PyQt binding have no some functions from Qt 4.6
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: PyQt4
Version: 6.0
Hardware: Unspecified
OS: Unspecified
low
high
Target Milestone: rc
: ---
Assignee: Than Ngo
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-14 10:37 UTC by Коренберг Марк
Modified: 2012-06-28 23:02 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-06-28 23:02:32 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Коренберг Марк 2011-01-14 10:37:20 UTC
http://doc.qt.nokia.com/4.6-snapshot/qicon.html#fromTheme

pyqt binding does not have this function. It appear that binding is built against Qt 4.5

This function has appear in Qt 4.6

# strings /usr/lib/libQtGui.so | fgrep fromTheme
_ZN5QIcon9fromThemeERK7QStringRKS_
#

# strings /usr/lib/python2.6/site-packages/PyQt4/QtGui.so | fgrep fromTheme
#

Comment 2 Коренберг Марк 2011-01-14 11:07:08 UTC
also, this binding does not support keyword arguments:

... traceback cutted...
    (r,v)=QInputDialog.getText(None,self.title,labelify(label),text=init)
TypeError: getText() takes no keyword arguments


in Ubuntu, fromTheme and keyword are work from box

Comment 3 RHEL Program Management 2011-01-14 11:09:56 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 4 Than Ngo 2011-02-09 12:11:11 UTC
(In reply to comment #0)
> http://doc.qt.nokia.com/4.6-snapshot/qicon.html#fromTheme
> 
> pyqt binding does not have this function. It appear that binding is built
> against Qt 4.5
> 
> This function has appear in Qt 4.6
> 
> # strings /usr/lib/libQtGui.so | fgrep fromTheme
> _ZN5QIcon9fromThemeERK7QStringRKS_
> #
> 
> # strings /usr/lib/python2.6/site-packages/PyQt4/QtGui.so | fgrep fromTheme
> #

It's supported in qt-4.6 but not yet supported in PyQt4-4.6.2 upstream which is included in rhel6. For this function fromTheme the new version PyQt4 is needed.

(In reply to comment #2)
> also, this binding does not support keyword arguments:
> 
> ... traceback cutted...
>     (r,v)=QInputDialog.getText(None,self.title,labelify(label),text=init)
> TypeError: getText() takes no keyword arguments
> 
> 
> in Ubuntu, fromTheme and keyword are work from box
i wonder how it works for you, but taken a look at the qt source the function getText needs more arguments.

static QString getText(QWidget *parent, const QString &title, const QString &label,
                           QLineEdit::EchoMode echo = QLineEdit::Normal,
                           const QString &text = QString(), bool *ok = 0, Qt::WindowFlags flags = 0);


so the 4. argument "QLineEdit::EchoMode" is missing here (r,v)=QInputDialog.getText(None,self.title,labelify(label),text=init) seems

Comment 5 Than Ngo 2011-02-10 16:35:34 UTC
the bug is closed as notabug, we don't plan to update new pyqt4 version in next rhel6 update.

Comment 6 Коренберг Марк 2011-02-14 13:13:31 UTC
No, QLineEdit::EchoMode is not missing. first 3 arguments are positional arguments, foreth argument is so called "keyword" argument. So, replacing "text=init" to just "init" will cause error.

Ubuntu:
================================================
mmarkk@mmarkk-work:~$ dpkg -l | fgrep -i python-qt
ii  python-qt4   4.7.4-0ubuntu1  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

In [2]: from PyQt4.QtGui import *

In [3]: app=QApplication(list())
In [4]: QInputDialog.getText(None,'title','label')
Out[4]: (PyQt4.QtCore.QString(u'xxx'), True)

In [5]: QInputDialog.getText(None,'title','label','defaulttext')
---------------------------------------------------------------------------
TypeError: QInputDialog.getText(QWidget, QString, QString, QLineEdit.EchoMode mode=QLineEdit.Normal, QString text=QString(), Qt.WindowFlags flags=0) -> (QString, bool): argument 4 has unexpected type 'str'

In [8]: QInputDialog.getText(None,'title','label',text='init')
Out[8]: (PyQt4.QtCore.QString(u'init'), True)


RHEL6:
================================================
[mmarkk@RHEL6 ~]$ rpm -qa | fgrep -i pyqt
PyQt4-4.6.2-8.el6.i686
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

>>> from PyQt4.QtGui import *
>>> app=QApplication(list())
>>> QInputDialog.getText(None,'title','label')
(PyQt4.QtCore.QString(u'xxx'), True)

>>> QInputDialog.getText(None,'title','label',text='init')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: getText() takes no keyword arguments

Comment 7 Than Ngo 2012-06-28 23:02:32 UTC
(In reply to comment #6)
> No, QLineEdit::EchoMode is not missing. first 3 arguments are positional
> arguments, foreth argument is so called "keyword" argument. So, replacing
> "text=init" to just "init" will cause error.
> 
> Ubuntu:
> ================================================
> mmarkk@mmarkk-work:~$ dpkg -l | fgrep -i python-qt
> ii  python-qt4   4.7.4-0ubuntu1

it's new feature in sip-4.10/PyQt4-4.7.x which has the support for the keyword arguments. You should please use QInputDialog.getText(None,'title','label', QlineEdit.Normal, 'init' which is correct for PyQt-4.6/sip-4.9


Note You need to log in before you can comment on or make changes to this bug.