qt4 - QProgressBar Error -


I am trying to add QProgressBar to my code, but there are some problems. I have to go through the designer and in the code progress bar added, I QprogressBar object to do with the pointer on a separate thread because it QProgressBar updated as data processing, however, I get this message: ../../src/xcb_lock.c: 77 : _XGetXCBBuffer: intent (`(int) ((xcb_req) - (dpy-> request))> = 0) 'failed i am Ubuntu 8.10 (2.6.27-11) on Qt-4.5.0 L am. I also tried QT-4.3.5 in RHEL 5 (2.6.18) and I got a different error, some error, like the X error, like the QPaint error, it seems that when I start with my main app edition loop I update the progress bar.

Please help Nimesh

QWidget class And all its subclasses, which contain QProgressBar , are not reentrant and can not be used outside the main thread. See the following document:

You are getting errors because you are trying to update QProgressBar from outside the main thread.

The preferred method of updating the progress bar is to periodically generate a signal in the form of a signal to create an object associated with your data processing thread, then this signal is set to setValue (int) QProgressBar in the slot. Qt will ensure that the signal slot connection is thread-safe, see documentation on adding signals and slots to all threads:

Hope it helps.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -