Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:error': 0.03; '(all': 0.07; 'column': 0.07; 'rows': 0.09; 'skip:/ 10': 0.09; 'columns': 0.16; 'nodes': 0.16; 'skip:q 30': 0.16; 'skip:q 50': 0.16; 'widgets.': 0.16; 'skip:# 20': 0.16; 'all,': 0.19; 'import': 0.22; 'print': 0.22; 'question': 0.24; 'code': 0.31; 'node': 0.31; 'ok.': 0.31; 'skip:q 20': 0.31; 'subject:all': 0.32; 'but': 0.35; 'yours,': 0.36; 'filled': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'dear': 0.65; 'subject:Logical': 0.84 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=r2nqwlqZYdtixpMnAJqACzoUrDJjmUIBVIzedXnvkUw=; b=rDYZPckW9RiGMFK9vsMXWd751EpiwZJcU4uTLrqPKNt7QLZMpznEAwvgvc3uf001H7vrUEBxUfkqcBTOO7u0iI8CWkfvJ4ABFNHNrOs9i59SUwQ2BQ5XK6+yvy/yY8/7YwNMNOWLtxKsNCDw2k+mMqWjHMxNGJkLauibq54PO4s=; Subject: Logical error in filling QTableWidget and filling all of nodes From: Mohsen Pahlevanzadeh To: python-list@python.org Date: Mon, 09 Sep 2013 09:45:16 +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: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1378703734 news.xs4all.nl 15871 [2001:888:2000:d::a6]:48400 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:53855 Dear All, I have the following code (PyQt): ///////////////// searchFrameObject.tableWidget.setRowCount(rowCounter) searchFrameObject.tableWidget.setColumnCount(5) for row in range(rowCounter): for column in range(5): for result in query: item = QtGui.QTableWidgetItem(_fromUtf8(result.name)) item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEnabled) searchFrameObject.tableWidget.setItem(row,column,item) #item = QtGui.QTableWidgetItem(String(result.bought_price)) #item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEnabled) #searchFrameObject.tableWidget.setItem(row,column+1,item) #item = QtGui.QTableWidgetItem(result.bought_date) #item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEnabled) #searchFrameObject.tableWidget.setItem(row,column+2,item) item = QtGui.QTableWidgetItem(result.stock) item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEnabled) searchFrameObject.tableWidget.setItem(row,column+3,item) item = QtGui.QTableWidgetItem(result.minimum_bound) item.setFlags(item.flags() ^ QtCore.Qt.ItemIsEnabled) searchFrameObject.tableWidget.setItem(row,column+4,item) //////////////// When i search in DB, i print result.name or print result.stock , everything is OK. But when i import them into QtableWidget i see just node result.name addeed to widgets. (all of nodes filled from result.name) My Question is , How i fill rows and columns with my fields? Yours, Mohsen