Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #54263
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <mohsen@pahlevanzadeh.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'output': 0.05; 'problem:': 0.07; "'name':": 0.09; 'skip:o 60': 0.09; 'def': 0.12; 'dict': 0.16; 'help...': 0.16; 'lambda:': 0.16; 'skip:q 30': 0.16; 'subject:unicode': 0.16; 'wrote:': 0.18; 'all,': 0.19; 'header:In- Reply-To:1': 0.27; "doesn't": 0.30; 'code': 0.31; "skip:' 10": 0.31; 'skip:s 70': 0.31; 'up.': 0.33; 'skip:# 10': 0.33; 'problem.': 0.35; 'but': 0.35; 'yours,': 0.36; 'filled': 0.38; 'to:addr:python-list': 0.38; 'stock': 0.39; 'to:addr:python.org': 0.39; 'skip:p 20': 0.39; 'skip:u 10': 0.60; 'name': 0.63; 'field': 0.63; 'dear': 0.65 |
| DKIM-Signature | v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=pahlevanzadeh.org; s=default; h=Content-Transfer-Encoding:Mime-Version:Content-Type:References:In-Reply-To:Date:To:From:Subject:Message-ID; bh=u1WOdlzlbcBebtz2OD94l6l7z2kWNba4YSUYUhR95zw=; b=QRLPD5yHPzSlrvIaeICYqWlgvBh/7wh3pcEhbcBA/O4RS30g5okmiaWtVxgepz842DKy3A0DGw0CiXk9L8EdAPcHyhesT3ipIXBa2IsMWqdkf5ysFqGndvkgzGoLf63kDVqmVEezUwKfSCAZyTPZUlAfFgpZRSstIMflF01sU7A=; |
| Subject | Re: Qt connect and first connect or unicode |
| From | Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> |
| To | python-list@python.org |
| Date | Tue, 17 Sep 2013 08:50:00 +0430 |
| In-Reply-To | <1379391155.24093.23.camel@debian> |
| References | <1379391155.24093.23.camel@debian> |
| Content-Type | text/plain; charset="UTF-8" |
| X-Mailer | Evolution 3.4.4-4+b1 |
| Mime-Version | 1.0 |
| Content-Transfer-Encoding | 7bit |
| X-AntiAbuse | This header was added to track abuse, please include it with any abuse report |
| X-AntiAbuse | Primary Hostname - part7.royal-servers.com |
| X-AntiAbuse | Original Domain - python.org |
| X-AntiAbuse | Originator/Caller UID/GID - [47 12] / [47 12] |
| X-AntiAbuse | Sender Address Domain - pahlevanzadeh.org |
| X-Get-Message-Sender-Via | part7.royal-servers.com: authenticated_id: mohsen@pahlevanzadeh.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.48.1379391610.18130.python-list@python.org> (permalink) |
| Lines | 91 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1379391610 news.xs4all.nl 16006 [2001:888:2000:d::a6]:50038 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:54263 |
Show key headers only | View raw
On Tue, 2013-09-17 at 08:42 +0430, Mohsen Pahlevanzadeh wrote:
> Dear all,
>
> Unfortunately, i confused and need help... the following code is:
> ###################################################
> ##CheckBox:
> QtCore.QObject.connect(self.checkBox,
> QtCore.SIGNAL(_fromUtf8("toggled(bool)")), lambda:
> self.materialsInstance.setFilterDict("C",self,"name",self.lineEdit.text()))
>
> QtCore.QObject.connect(self.checkBox_2,
> QtCore.SIGNAL(_fromUtf8("toggled(bool)")), lambda:
> self.materialsInstance.setFilterDict("C",self,"bought_price",persianToInteger(unicode(self.lineEdit_2.text()))))
>
> QtCore.QObject.connect(self.checkBox_4,
> QtCore.SIGNAL(_fromUtf8("toggled(bool)")), lambda:
> self.materialsInstance.setFilterDict("C",self,"stock",persianToInteger(unicode(self.lineEdit_3.text()))))
>
> ##LineEdit
> QtCore.QObject.connect(self.lineEdit,
> QtCore.SIGNAL(_fromUtf8("editingFinished()")), lambda:
> self.materialsInstance.setFilterDict("L",self,"name",self.lineEdit.text()))
>
> QtCore.QObject.connect(self.lineEdit_2,
> QtCore.SIGNAL(_fromUtf8("editingFinished()")), lambda:
> self.materialsInstance.setFilterDict("L",self,"bought_price",persianToInteger(unicode(self.lineEdit_2.text()))))
>
> QtCore.QObject.connect(self.lineEdit_3,
> QtCore.SIGNAL(_fromUtf8("editingFinished()")), lambda:
> self.materialsInstance.setFilterDict("L",self,"stock",persianToInteger(unicode(self.lineEdit_3.text()))))
>
> QtCore.QObject.connect(self.lineEdit,
> QtCore.SIGNAL(_fromUtf8("editingFinished()")), lambda:
> self.materialsInstance.responseToRequestForData(self))
>
> QtCore.QObject.connect(self.lineEdit_2,
> QtCore.SIGNAL(_fromUtf8("editingFinished()")), lambda:
> self.materialsInstance.responseToRequestForData(self))
>
> QtCore.QObject.connect(self.lineEdit_3,
> QtCore.SIGNAL(_fromUtf8("editingFinished()")), lambda:
> self.materialsInstance.responseToRequestForData(self))
>
> QtCore.QObject.connect(self.lineEdit,
> QtCore.SIGNAL(_fromUtf8("returnPressed()")), lambda:
> self.materialsInstance.responseToRequestForData(self))
>
> QtCore.QObject.connect(self.lineEdit_2,
> QtCore.SIGNAL(_fromUtf8("returnPressed()")), lambda:
> self.materialsInstance.responseToRequestForData(self))
>
> QtCore.QObject.connect(self.lineEdit_3,
> QtCore.SIGNAL(_fromUtf8("returnPressed()")), lambda:
> self.materialsInstance.responseToRequestForData(self))
>
> ##PushButton:
> QtCore.QObject.connect(self.pushButtonSearch,
> QtCore.SIGNAL(_fromUtf8("clicked()")), lambda:
> self.materialsInstance.responseToRequestForData(self))
>
>
>
> def setFilterDict(self,widget,obj,field,lineEditContent):
> if field not in obj.materialsInstance.filterNameDict.keys():
>
> obj.materialsInstance.filterNameDict.update({field:lineEditContent})
>
>
> ####################################################
> Description:
> I have 3 widget:
> 1. CheckBox: a. name b. bought_price c. stock
> 2. LineEdit : a. name b. bought_price c. stock
> 3. One PushButton
>
> i have three slot: 1. responseToRequestForData() 2.setFilterDict()
> 3.unSetFilterDict()
> responseToRequestForData(): start to search in DB
> setFilterDict(): fill a dict from my LineEdit
>
> Problem:
> My name is filled in dict but its value doesn't fill up. b and c don't
> have any problem.
>
> Yours,
> Mohsen
>
I see same output in console:
{'stock': 2, 'name': PyQt4.QtCore.QString(u''), 'bought_price': 23}
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Qt connect and first connect or unicode Mohsen Pahlevanzadeh <mohsen@pahlevanzadeh.org> - 2013-09-17 08:50 +0430
csiph-web