Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7638845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:16:21+00:00 2026-05-31T08:16:21+00:00

I have a program running many threads, one of them controls the interface and

  • 0

I have a program running many threads, one of them controls the interface and another launches some functions every few seconds. I want the timing thread to update a progress bar but when I do, I get:

X Error: RenderBadGlyphSet (invalid GlyphSet parameter) 165
  Extension:    150 (RENDER)
  Minor opcode: 25 (RenderCompositeGlyphs32)
  Resource id:  0x25
X Error: RenderBadGlyphSet (invalid GlyphSet parameter) 165
  Extension:    150 (RENDER)
  Minor opcode: 25 (RenderCompositeGlyphs32)
  Resource id:  0x25
X Error: RenderBadGlyphSet (invalid GlyphSet parameter) 165
  Extension:    150 (RENDER)
  Minor opcode: 25 (RenderCompositeGlyphs32)
  Resource id:  0x25
X Error: RenderBadGlyphSet (invalid GlyphSet parameter) 165
  Extension:    150 (RENDER)
  Minor opcode: 25 (RenderCompositeGlyphs32)
  Resource id:  0x25
QPixmap: It is not safe to use pixmaps outside the GUI thread
QPixmap: It is not safe to use pixmaps outside the GUI thread

Here is my code:

#!/usr/bin/python
from PyQt4 import QtCore, QtGui
import time

class WTrainning(wMeta.WMeta, QtGui.QWidget):

    def __init__(self):
        super(WTrainning, self).__init__()

    def createUI(self):
        
        ...
        self.progressBar = QtGui.QProgressBar(self)
        self.progressBar.setGeometry(QtCore.QRect(30, 70, 481, 23))
        self.progressBar.setProperty("value", 24)
        self.progressBar.setObjectName("progressBar")
        QtCore.QObject.connect(self.progressBar, QtCore.SIGNAL("valueChanged(int)"), self.progressBar.setValue) 
        ...

    def modifyBarr(self, number):
        self.progressBar.setValue(number)

class Crono(QtCore.QThread):
    
    def __init__(self, parent):
                
        QtCore.QThread.__init__(self,parent)


    def checkStatus(self):

        for x in range(1,101):
            self.wtobject.modifyBarr(x)                         
            time.sleep(1)
            

I’d tried with signals (new and old version) and making a dedicated thread for UI updating, but nothing worked. I’m using python 2.6.6 and pyqt 4.7.4

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T08:16:22+00:00Added an answer on May 31, 2026 at 8:16 am

    You have to define a signal for the Crono object like this:

    class Crono(QtCore.QThread):
        tick = QtCore.pyqtSignal(int, name="changed") #New style signal
    
        def __init__(self, parent):
            QtCore.QThread.__init__(self,parent)
    
        def checkStatus(self):
            for x in range(1,101):
                self.tick.emit(x)                     
                time.sleep(1)
    

    Then connect it to a slot of the progress bar.

    class WTrainning(wMeta.WMeta, QtGui.QWidget):
    
        def __init__(self):
            super(WTrainning, self).__init__()
            self.crono = Crono()
    
        def createUI(self):
            #Create GUI stuff here
    
            #Connect signal of self.crono to a slot of self.progressBar
            self.crono.tick.connect(self.progressBar.setValue)
    

    What you were doing is connect the SIGNAL valueChanged of the progressBar to its own SLOT setValue

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a program 'foo' running different threads, fooT1, fooT2, .. fooTn. Now if
I'm running a java program on many computers that interact between them. After several
I have a Python program that spawns many threads, runs 4 at a time,
I have one main thread, and many other background threads. The main usage of
I have a python program that is running for many days. Memory usage does
I have a .NET CF program (running on a Smartphone) and I have written
I have a situation where I might have multiple instances of a program running
What is the best way to have my C# Compact Framework program running in
I have a Matlab program that is running longer than I'd like it to.
I have a program in Octave that has a loop - running a function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.