<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>David, <br></div><div><br></div><div>Thank you so much. Your suggestion got me thinking the right way and now the program is working just as I want it to. To prove how much of a noob I am, I should tell you, now that it is working I could sit and watch the screen toggle between queries for hours! HA. Feels like a major achievement. Of course, I realize its not really at all, but boy it sure feels cool.</div><div><br>Thanks,</div><div><br></div><div>Brian</div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>pyqt-request@riverbankcomputing.com<br><b>To: </b>pyqt@riverbankcomputing.com<br><b>Sent: </b>Friday, July 12, 2013 5:00:01 AM<br><b>Subject: </b>PyQt Digest, Vol 108, Issue 13<br><div><br></div>Send PyQt mailing list submissions to<br> pyqt@riverbankcomputing.com<br><div><br></div>To subscribe or unsubscribe via the World Wide Web, visit<br> http://www.riverbankcomputing.com/mailman/listinfo/pyqt<br>or, via email, send a message with subject or body 'help' to<br> pyqt-request@riverbankcomputing.com<br><div><br></div>You can reach the person managing the list at<br> pyqt-owner@riverbankcomputing.com<br><div><br></div>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of PyQt digest..."<br><div><br></div><br>Today's Topics:<br><div><br></div> 1. Re: help a noob, Im a noob (David Boddie)<br> 2. Parent child relationship: child survives parent (Volker Pilipp)<br> 3. Re: Parent child relationship: child survives parent<br> (Phil Thompson)<br><div><br></div><br>----------------------------------------------------------------------<br><div><br></div>Message: 1<br>Date: Thu, 11 Jul 2013 20:00:50 +0200<br>From: David Boddie <david@boddie.org.uk><br>To: pyqt@riverbankcomputing.com<br>Subject: Re: [PyQt] help a noob, Im a noob<br>Message-ID: <201307112000.51212.david@boddie.org.uk><br>Content-Type: Text/Plain; charset="iso-8859-1"<br><div><br></div>On Tue, 9 Jul 2013 15:00:25 -0600 (MDT), Brian McDonald wrote:<br><div><br></div>> Just getting into programming in general. Loving python so far. I am<br>> working on an application that will display database information on<br>> screen. The idea is that some rows of database information will appear on<br>> screen for 30 seconds, and then the next rows will appear. I think I have<br>> made some pretty good headway getting the database connected and even<br>> displaying data, but I am having a hell of a time getting the data to<br>> refresh to a new query after 30 seconds. I feel like I must just be<br>> calling the qtimer at the wrong point in the program. Or, perhaps I should<br>> be using a "while" loop of some kind. Anyway, here is my code. Any help<br>> would be sooo appreciated.<br><div><br></div>Just quickly glancing at the code, I notice that you start the timer after<br>the application has run. Have you tried starting the timer in your run()<br>method?<br><div><br></div>David<br><div><br></div><br>------------------------------<br><div><br></div>Message: 2<br>Date: Fri, 12 Jul 2013 09:30:46 +0200<br>From: Volker Pilipp <volker.pilipp@dectris.com><br>To: pyqt@riverbankcomputing.com<br>Subject: [PyQt] Parent child relationship: child survives parent<br>Message-ID:<br> <CAHio_yWovSQyiq1x1TMeWOGoG4pjM6179yCDELKgS0bXrj7_rQ@mail.gmail.com><br>Content-Type: text/plain; charset=ISO-8859-1<br><div><br></div>I've got a little bit confused about ownership of objects in SIP As<br>far as I understand, if ParentObject owns ChildObject, the destruction<br>of ChildObject is left to c++ i.e. the c++ destructor of ParentObject<br>is expected to destruct ChildObject. This behaviour may result in a<br>seg fault if the python programmer does not make sure that ChildObject<br>goes out of scope before ParentObject does. Indeed, there are many<br>scenarios where this may happen accidentally.<br><div><br></div>That's what I would like to have: The ChildObject keeps a reference<br>on ParentObject that is released during destruction of ChildObject,<br>where the Python destructor of ChildObject must not call the c++<br>destructor of the wrapped c++ instance (this is done during<br>destruction of ParentObject).<br>I am wondering if this behavior is possible to achieve in SIP.<br><div><br></div><br>------------------------------<br><div><br></div>Message: 3<br>Date: Fri, 12 Jul 2013 08:44:43 +0100<br>From: Phil Thompson <phil@riverbankcomputing.com><br>To: Volker Pilipp <volker.pilipp@dectris.com><br>Cc: pyqt@riverbankcomputing.com<br>Subject: Re: [PyQt] Parent child relationship: child survives parent<br>Message-ID: <84fc10803f95f9bd598555abed8b40f7@localhost><br>Content-Type: text/plain; charset=UTF-8<br><div><br></div>On Fri, 12 Jul 2013 09:30:46 +0200, Volker Pilipp<br><volker.pilipp@dectris.com> wrote:<br>> I've got a little bit confused about ownership of objects in SIP As<br>> far as I understand, if ParentObject owns ChildObject, the destruction<br>> of ChildObject is left to c++ i.e. the c++ destructor of ParentObject<br>> is expected to destruct ChildObject. This behaviour may result in a<br>> seg fault if the python programmer does not make sure that ChildObject<br>> goes out of scope before ParentObject does. Indeed, there are many<br>> scenarios where this may happen accidentally.<br><div><br></div>If you are talking about QObject then you shouldn't get a segfault - you<br>should get a Python exception.<br><div><br></div>> That's what I would like to have: The ChildObject keeps a reference<br>> on ParentObject that is released during destruction of ChildObject,<br>> where the Python destructor of ChildObject must not call the c++<br>> destructor of the wrapped c++ instance (this is done during<br>> destruction of ParentObject).<br><div><br></div>The Python destructor will not call the C++ destructor if the C++ instance<br>has a parent. If you think it does then provide a test case that<br>demonstrates it.<br><div><br></div>> I am wondering if this behavior is possible to achieve in SIP.<br><div><br></div>Phil<br><div><br></div><br>------------------------------<br><div><br></div>_______________________________________________<br>PyQt mailing list<br>PyQt@riverbankcomputing.com<br>http://www.riverbankcomputing.com/mailman/listinfo/pyqt<br><div><br></div>End of PyQt Digest, Vol 108, Issue 13<br>*************************************<br></div><div><br></div></div></body></html>