Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.025 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'column': 0.07; 'table.': 0.07; 'cc:addr:python-list': 0.11; 'gui': 0.12; '24,': 0.16; 'added.': 0.16; 'columns': 0.16; 'gpg': 0.16; 'wrote:': 0.18; 'code.': 0.18; 'wed,': 0.18; 'replacing': 0.19; 'written': 0.21; 'portion': 0.22; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'replace': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; 'changes,': 0.26; 'compare': 0.26; 'post': 0.26; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'idea': 0.28; 'point': 0.28; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'code': 0.31; 'anyone': 0.31; 'url:python': 0.33; 'table': 0.34; 'problem': 0.35; 'done.': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'url:listinfo': 0.36; 'url:org': 0.36; 'does': 0.39; 'url:mail': 0.40; 'how': 0.40; 'tips': 0.61; 'new': 0.61; 'from:charset:utf-8': 0.61; 'first': 0.61; 'show': 0.63; 'real': 0.63; 'to:addr:gmail.com': 0.65; 'sara': 0.84; 'url:tk': 0.95; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=jVyfrWoku/kzSnyMftrXRq6zYuD+7d5L4TdRo2JlGco=; b=m2MEWlRxLZGnuoKLE4p0wBOiXYhuq7XrMlzZrjmzRG6+f9zkLIg0dtmythRy+Ral7j evihelz3jZHqI7sne1GTGbOULsvBP7U6sjroA9Gxz7NLrspDaUmaejSwqQJSOUugpdg6 UHaf3b6xQFT1kp77crKADwB2vvFIzMEDwEQ64TfBp+maHZpOFo1YK4UhUWPlj/DjjuWX NAKaMenaKLFedh0xT3HMaVZAghzOeaq7xzhBMlEsrYz3hSTsdo2etOXuc3FDA6SAOQab /7vcBeGUQXtbInHNtaNDBxL6aEuTmw68u+DQZ/20Uyf5HEcDfZ2w8xnQt3aSWnSgNzxL ofpQ== X-Received: by 10.50.50.71 with SMTP id a7mr26538042igo.14.1366790336118; Wed, 24 Apr 2013 00:58:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1a87f00d-636d-4795-80d5-7bf196d1177f@googlegroups.com> References: <1a87f00d-636d-4795-80d5-7bf196d1177f@googlegroups.com> From: =?UTF-8?B?Q2hyaXMg4oCcS3dwb2xza2HigJ0gV2Fycmljaw==?= Date: Wed, 24 Apr 2013 09:58:36 +0200 Subject: Re: QTableWidget updating columns in a single row To: Sara Lochtie Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366790338 news.xs4all.nl 2275 [2001:888:2000:d::a6]:45753 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!feed.ac-versailles.fr!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:44249 On Wed, Apr 24, 2013 at 8:22 AM, Sara Lochtie wrot= e: > I have written a GUI that gets data sent to it in real time and this data= is displayed in a table. Every time data is sent in it is displayed in the= table in a new row. My problem is that I would like to have the data just = replace the old in the first row. > > The table has 6 columns (A, B, C, D, E, F) I want the new data to continu= e replacing the old data in the same row unless the data that goes under co= lumn A changes, at which point a new row would be added. > > Does anyone have tips on how to approach this? I can post a portion of my= code to get a better idea of what I have done. > > > -- > http://mail.python.org/mailman/listinfo/python-list My suggestion: compare the new data=E2=80=99s column A with the existing da= ta (store a copy of the old data somewhere?). If it differs, add a new row; if it doesn=E2=80=99t, change an existing one. If you need help with = the exact implementation, show the *entire* code. -- Kwpolska | GPG KEY: 5EAAEA16 stop html mail | always bottom-post http://asciiribbon.org | http://caliburn.nl/topposting.html