473,609 Members | 1,851 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Updating PyQt widgets question

Hello all,

I'm working on a little application using PyQt. The main window is just a
dialog with 2 progress bars and a few labels. In its original form, the
dialog started, then ran a function which downloaded a directory full of
files from an ftp server, using an ftplib.FTP object's retrbinary function.

http://xoffender.de/Downloads/screenie4.png

Now, inside the callback function of the retrbinary call, I was calling the
progress bars' setProgress function, and the labels' setText functions.
What happened was, the progress bars got updated, albeit sporadically, but
the labels didn't. They only changed once the function was completed.

I've changed this now so that the download process runs in a thread, and I
use a self.startTimer (50) call with a timerEvent function that updates the
progress bars and labels by reading variables out of the thread. This works
perfectly, as far as I can tell, but I still have 2 questions:

- Is the above result (with the non-updating labels) the expected behavior,
or did I do something wrong?
- Is the thread/timer combination the 'correct' way to do it? I also tried
connecting emit() signals within the thread to updating slot() functions in
the dialog, which worked but seemed a little chaotic.

Thanks!
Eric

--
---
s- should be removed to contact me...
Jul 18 '05 #1
0 1288

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

35
7746
by: Vamsi Mudrageda | last post by:
I am kind of new to Python, and after trying and using wxPython, I found it kind of lacking in easy-to-read documentation, speed at loading, and GUI response-time. So I am looking for an another GUI toolkit that is cross-platform for Python, and am leaning toward PyQt (PyGTK is kind of dull looking in comparison). Unfortunately, although TrollTech says Qt is cross-platform, its license strategy has me a bit confused. So here is to...
2
2777
by: Neil Zanella | last post by:
Hello, I am using the following with python: The PyQt python bindings: http://www.riverbankcomputing.co.uk/pyqt/ based on the Qt GUI Application Framework:
1
1756
by: Paul Drummond | last post by:
Hi Guys, Sorry if this is the wrong place to post - is there a pyQt newsgroup? I know there is a mailing list but I hate them! I am using pyQt and BlackAdder which comes with Qt 3.3.3 - it costs about £30 but its worth it for Qt. However, it doesn't come with any Qt Database Drivers. So the question is, is there any way to use QDataTable (and other QT
1
1606
by: Michael McGarry | last post by:
Hi, I am having a problem making a widget appear. I have 5 widgets which are windows with no parents. 3 of the widgets appear without a problem the other 2 widgets will not appear when I invoke widget.show() from within a handler for another widget. I am completely clueless as to why these 2 widgets will not draw. One of them is simply a wait window I want to appear while I am performing a time consuming task. Here is a snippet of...
17
11816
by: eholbroo | last post by:
I've narrowed down my toolkit selection for my project to wxPython and pyQt, and now i'd like to hear any opinions, war stories, peeves, etc, about them, particularly from anyone who's used _both_toolkits_. I'm only mildly interested in the IDEs and UI designers for each, as i want to do as much as i can in just Xemacs and xterm. Feel free to rant, rave, pontificate, whatever. t.i.a., E
2
5113
by: gregarican | last post by:
I have an application I'm writing using PyQt. I'm trying to create the various windows by subclassing Qt objects. I have a subclassed QMainWindow as the parent, and then a series of subclassed QWidgets as other child windows that get used. How can I pass variables back and forth between the parent and child windows? For example, if I have a child window that processes a customer lookup I want the retrieved values to be passed back to the...
3
2066
by: Phil Thompson | last post by:
Riverbank Computing is pleased to announce the release of PyQt v4.0beta1 available from http://www.riverbankcomputing.co.uk/pyqt/. PyQt is a comprehensive set of Qt bindings for the Python programming language and supports the same platforms as Qt (Windows, Linux and MacOS/X). Like Qt, PyQt is available under the GPL and a commercial license. PyQt v4 supports Qt v4 (http://www.trolltech.com/products/qt/index.html). PyQt v3 is still...
1
6068
by: Peter TB Brett | last post by:
Hi folks, Although the PyQt documentation indicates that QGLWidget & friends have been ported to Python for the PyQt bindings, I'm not entirely sure what's necessary to make the normal OpenGL/GLUT interface available. Does PyQt work okay with PyOpenGL? Or is a more complicated workaround needed? If anyone has experience with working with Python/Qt/OpenGL and can offer
0
362
by: David Boddie | last post by:
On Fri Nov 2 12:59:48 CET 2007, Bart. wrote: You can use PyQt, Kross or PythonQt for this, but only PyQt will give you a comprehensive API "out of the box". There is code in the PyQt source distribution that shows how to set up the Python interpreter inside a C++ plugin and import modules - it's used to load custom Python widgets into Qt Designer.
0
8139
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8091
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8408
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7024
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5524
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4032
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4098
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1686
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.