Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.034 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'problem:': 0.07; '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; 'all,': 0.19; "doesn't": 0.30; 'code': 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: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:Date:To:From:Subject:Message-ID; bh=diD3tZBP0h79UN9cFirEeUVt4LAobVDqmfKAcIh+dCY=; b=KVgVuZLe6YAhkMXiqm+Y4HP/5s3fq76FInd1ksb2VD+t8J61COzdU7wzJvdi8JJHvwrjN26SGTKWjALpk16YESPlJcTNbizUEL3Mfy7Aepfi86ilyPC9mDQ0TdUCJhPdBSxG3Qqs7vu9/Rs2OBEJINL61fWXEyQ24ZN+diGtgWE=; Subject: Qt connect and first connect or unicode From: Mohsen Pahlevanzadeh To: python-list@python.org Date: Tue, 17 Sep 2013 08:42:35 +0430 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 86 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1379391172 news.xs4all.nl 15905 [2001:888:2000:d::a6]:47184 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54262 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