Hello. As from the topic title, i am trying to work a multithread GUI where the progress bar indicates the running process completion (like we always see when we are installing/uninstalling/downloading). I've read a couple of written tutorials and some other forums discussions regarding the progress bar and multithreading. I've also even tried the simple multithreading examples given but I still don't get it especially adding the process that i want to run. This is my GUI (simple) ![window.JPG](/attachments/large/4/38a5cc286b292d70c71cda871a2d80e5.JPG "align-center") : class MyApp(QtWidgets.QMainWindow, Ui_MainWindow): def __init__(self): QtWidgets.QMainWindow.__init__(self) Ui_MainWindow.__init__(self) self.setupUi(self) self.progressBar.setVisible(False) #I WASN'T SUCCESSFULL IN MANUALLY CREATING A PROGRESS BAR BUT …

Member Avatar
Member Avatar
+0 forum 1

from PyQt5 import QtCore, QtGui, QtWidgets # Import the PyQt5 module we'll need import sys # We need sys so that we can pass argv to QApplication import design # This file holds our MainWindow and all design related things # it also keeps events etc that we defined in Qt Designer import os # For listing directory methods class ExampleApp(QtWidgets.QMainWindow, design.Ui_MainWindow): def __init__(self): # Explaining super is out of the scope of this article # So please google it if you're not familar with it # Simple reason why we use it here is that it allows us to …

Member Avatar
+0 forum 0

Hello, so im trying to use PyQt5 on my windows 7 but I might not be doing it right or something. So ive done `pip install SIP` and `pip install pyqt5`. Following [this](http://projects.skylogic.ca/blog/how-to-install-pyqt5-and-build-your-first-gui-in-python-3-4/) post, Ive done `from PyQt5 import QtCore, QtGui, QtWidget` and I should have a **designer.exe** somewhere for the QT Designer but I dont have that in my directory. So i don't know, am i missing a step? something i need to download?

Member Avatar
Member Avatar
+0 forum 1

Using PySide's QAbstractTableModel allows you to easily customize a widget like QTableView and make it more generic in its application. Here we use it to present solvent data in tabular form and sort each column content by simply clicking on the header. You can feed it any data as long as you stick to the format of the data used, a header list and a list of data tuples/lists.

Member Avatar
Member Avatar
+4 forum 7

I'm hoping to create a scheduler based on data extracted from an Excel (2016) spreadsheet. At the moment I'm using Ubuntu 14.04 LTS with the desire to port the completed project to Android through Bulldozer. I like what I've heard about the simplicity of Pyqt. The completed project must work with Android. I have Android tablets running Lollipop and KitKat. I can develop using Ubuntu, Windows 7 & 10, Android, environments. What I need to know is if you think I will be working with the right combination of PyCharm, PyQT (if it will work with PyCharm?) and eventually Buildozer …

Member Avatar
+0 forum 0

I am trying to find out if a button is disabled....If it is , I want to enable it . For example : if button disabled: self.convertButton.setDisabled(False) So what can be button disabled be?

Member Avatar
Member Avatar
+0 forum 1

hello, Using Python 2.7, PyQt4, Qt Designer, and used pyuic4... I think thats it... windows 7? I have a GUI i created in Qt Designer. It has one button and one LCD number. I was trying to get the button to start and reset a timer, and have the elapsed time displayed as value on the LCD number in hh:mm:ss format. I have done numberous searches online, and found examples in other languages except for python? I have found examples that print time, but nothing in python which links to the LCD number from Qt Designer? Maybe it cant be …

Member Avatar
Member Avatar
+0 forum 2

This 'sticky' thread is for working examples of Python GUI code. Note that most wxPython examples have their own thread. Please use comments in your code to help the reader. The example code should be usable as a template, so folks get a feel for the toolkit and can use those examples/templates as a basis for more complex programs. We also welcome code that compares the various GUI toolkits. Again, don't clutter up the sticky with questions. Ask question in the regular forum. A brief history of GUI based Operating Systems migh be in order: The first Graphical User Interface …

Member Avatar
Member Avatar
+9 forum 235

I have this as my major code #!/usr/bin/env python # # @author: Joseph Rex # @website: http://josephrex.me # @repository: http://github.com/bl4ckdu5t/registron # # # import sys, webbrowser from PyQt4 import QtGui, QtCore from ui_registron import Ui_MainWindow try: import pyttsx except ImportError: raise ImportError, "pyttsx module is required for speech features of registron" class Main(QtGui.QMainWindow): """Main class for registron""" def __init__(self): QtGui.QMainWindow.__init__(self) self.ui = Ui_MainWindow() self.ui.setupUi(self) self.ui.connect(self.greetWelcome) self.ui.proceedBtn.clicked.connect(self.checkCampusID) #Menu Actions self.ui.actionQuit.triggered.connect(self.close) self.ui.actionDocumentation.triggered.connect(self.openGitPage) # self.ui.actionAbout.triggered.connect(self.aboutProgram) # self.ui.actionCredits.triggered.connect(self.showCredits) # self.ui.actionNewWindow.triggered.connect(self.cloneWindow) # self.ui.actionSignIn.triggered.connect(self.adminAuth) def greetWelcome(self): function.talk("Welcome to Registron") def checkCampusID(self): campusID = self.ui.matricInput.toPlainText() def openGitPage(self): webbrowser.open('http://github.com/bl4ckdu5t/registron') class programFunctions: """Core functions for registron""" def talk(self, speech): …

Member Avatar
Member Avatar
+0 forum 1

Hey ya guys, it's my first topic on DaniWeb, sounds like a good place to find help with programming. :) Today I'm trying to compile a simple code made for PyQt4 using cx_Freeze, but I'm getting an error, I'll show you all the codes: [B]example.pyw[/B] [CODE]import sys from PyQt4 import QtGui def main(): app = QtGui.QApplication(sys.argv) w = QtGui.QWidget() w.resize(250, 150) w.move(300, 300) w.setWindowTitle('Example') w.show() sys.exit(app.exec_()) if __name__ == '__main__': main()[/CODE] [B]setup.py[/B] [CODE]from cx_Freeze import setup, Executable includes = ["sip","re"] exe = Executable( script="example.pyw", base="Win32GUI" ) setup( options = {"build_exe": {"includes":includes}}, executables = [exe] ) [/CODE] After compiling the code, …

Member Avatar
Member Avatar
+0 forum 7

On line 21 of this code where I have self.greetWelcome() . I'll love for that function to be called after the GUI is loaded. What event do I have to listen for and on what object to call it after the GUI is loaded. As of now, it works before the GUI loads up. #!/usr/bin/env python # # @author: Joseph Rex # @website: http://josephrex.me # @repository: http://github.com/bl4ckdu5t/registron # # # import sys, webbrowser from PyQt4 import QtGui, QtCore from ui_registron import Ui_MainWindow try: import pyttsx except ImportError: raise ImportError, "pyttsx module is required for speech features of registron" class Main(QtGui.QMainWindow): …

Member Avatar
Member Avatar
+0 forum 3

so I have this example, which I've slightly modded to get the simplicities out of the way: from PyQt4 import QtGui, QtCore HORIZONTAL_HEADERS = ("Surname", "Given Name") class person_class(object): ''' a trivial custom data object ''' def __init__(self, sname, fname, isMale): self.sname = sname self.fname = fname self.isMale = isMale def __repr__(self): return "PERSON - %s %s"% (self.fname, self.sname) class TreeItem(object): ''' a python object used to return row/column data, and keep note of it's parents and/or children ''' def __init__(self, person, header, parentItem): self.person = person self.parentItem = parentItem self.header = header self.childItems = [] def appendChild(self, item): self.childItems.append(item) …

Member Avatar
Member Avatar
+0 forum 1

I havent done this before, but I want to make a window that plots a graph looking at file structure on different server locations, and in that UI I want to add control like if i want to copy the remote the file to local if missing or if outdated, is this possible to do in pyqt ? I would really appreciate if someone has a link to something like I am looking for?

Member Avatar
Member Avatar
+0 forum 3

books = { 'Contact':['Carl Sagan', '2'], 'End of Faith':['Sam Harris', '7'], 'on Mars':['Patrick Moore', '1'], } based on dictionary above, how can i get Modales Qdialog box that should have 3 column containing like below DialogBox BookName_Label: BookAutor_Label : Quantity_QSpinBox BookName_Label: BookAutor_Label : Quantity_QSpinBox BookName_Label: BookAutor_Label : Quantity_QSpinBox Ok Cancel

Member Avatar
Member Avatar
+0 forum 1

The PySide (PyQT) GUI toolkit can be used to play wave sound files.

Member Avatar
Member Avatar
+1 forum 1

I have made a QTableView that displays images from disk, there are two seriously agonizing problem I am facing. First of after the windows shows up making it maximize or changing size of window is very slow, and secondly I want to display images height width dependong on what can fit in the full window size of the maximized window keeping the aspect size of the thumbnails. Right now Images dont fit properly and text is getting displayed on left while i want it to display at bottom of the image. import sys import os from PyQt4 import QtGui, QtCore …

Member Avatar
+0 forum 0

How do I display images in QListView of size of standard thumbnail size like 250 x 200 , and file nametext should wrap to next line , right now the images displayed are very small and are not positioned under each other in proper row column order. import sys import os from PyQt4 import QtGui, QtCore class MyListModel(QtCore.QAbstractListModel): def __init__(self, datain, parent=None, *args): """ datain: a list where each item is a row """ QtCore.QAbstractListModel.__init__(self, parent, *args) self.listdata = datain def rowCount(self, parent=QtCore.QModelIndex()): return len(self.listdata) def data(self, index, role): if index.isValid() and role == QtCore.Qt.DecorationRole: return QtGui.QIcon(QtGui.QPixmap(self.listdata[index.row()])) if index.isValid() and …

Member Avatar
Member Avatar
+0 forum 4

Using the PySide GUI toolkit will make selecting, copying and pasting encrypted and decrypted text somewhat easier. Not ideal yet, but it will be a good start for those of you who are not very familiar with GUI programming.

Member Avatar
Member Avatar
+2 forum 1

[Click Here](hey there everyone... :) I need some help with an external runtime interface with PyQt... here's my current code: import API API.init() #show the Qt window _init_(depth) #(this module): print text to both the console and the Qt window (checking for updates to API) API.run(files) #take over the Qt window with API... how can I make this work??)

Member Avatar
+0 forum 0

A small test program exploring the PySide/PyQT Label widget. With HTML code you can do some nice formatting of the label's text.

Member Avatar
+5 forum 0

The PySide/PyQT QValidator restricts the type of input a widget like QLineEdit can accept. Here is a simple test.

Member Avatar
+1 forum 0

Hello, I have got [this](http://www.yasinuludag.com/darkorange.stylesheet) a Qt stylesheet, how do I load it to my PyQt module after creating a QString Object. if I do from PyQt4 import QtCore s = QtCore.QString('c:\myProject\darkFantasy.stylesheet') the above code loads the path string rather than the actual stylesheet. So how do I load the actual content of the stylesheet file..?

Member Avatar
+0 forum 0

Hey guys, I'm trying to move data by clicking on a QPushButton from one QTreeView in the second QTreeView. Do you know how to do this. I know that I have to connect the QPushButton with a method which makes this possible. I don't really know how this method looks like. Thanks for help.

Member Avatar
+0 forum 0

Hi, I just installed PyQt Designer to start creating UI's with python, I've used WxPython and TKinter before, but never really done anything with PyQt. So for some of you this might be a very simple question that I can't seem to find with google. I really like how it all works and I can create a UI very quickly, a bit like Visual Basic, but now I have 2 forms, 1 will be the main window and the other is going to be like a widget which I call by going through the menu bar at the top (Help …

Member Avatar
+0 forum 0

what QObject: Cannot create children for a parent that is in a different thread. (Parent is QTextDocument(0x905b660), parent's thread is QThread(0x8efc560), current thread is flooderthread(0x8efc548) error means ? and how to solve it??

Member Avatar
+0 forum 0

hey i have this error The debugged program raised the exception unhandled RuntimeError "underlying C/C++ object has been deleted" the code is: class qthread(QtCore.QThread): def __init__(self, x, y, z): self.x=x self.y=y self.z=z self.name="" self.m=hashlib.md5() def changeresultsig(self, text): self.emit(QtCore.SIGNAL("changeresult(text)"),text) def conssig(self, text): self.emit(QtCore.SIGNAL("cons(text)"), text) def enablesig(self): self.emit(QtCore.SIGNAL("enable(")) def disablesig(self): self.emit(QtCOre.SIGNAL("disable()")) def gui(self): self.emit(QtCore.SIGNAL("gui()")) def run(self): self.name="md"+str(z)+".dat" self.conssig("starting thread "+str(z)+"..") self.changeresultsig("starting thread "+str(z)+"..") self.gui() try: self.db=anydbm.open(name, "n") except e: self.conssig("error openning the database "+self.name+" "+e.reason()) self.changeresultsig("error oppening the database "+str(self.name)) self.enable() self.gui() pass return 1 self.s=string.printable self.conssigole("setting up...") self.gui() while self.x<=self.y: self.changeresultsig("starting loop..") self.conssig("starting loop..") self.gui() self.it=itertools.product(self.s, reapeat=self.x) for i in self.it: …

Member Avatar
Member Avatar
+0 forum 4

i have a Qt code writed in C++ . i want translate it to python code, but i have a problem in 4 code line: all code is: void TableView::print(QPainter* painter, const QRect& area) { const int rows = model()->rowCount(); const int cols = model()->columnCount(); // calculate the total width/height table would need without scaling double totalWidth = 0.0; for (int c = 0; c < cols; ++c) { totalWidth += columnWidth(c); } double totalHeight = 0.0; for (int r = 0; r < rows; ++r) { totalHeight += rowHeight(r); } // calculate proper scale factors const double scaleX = …

Member Avatar
Member Avatar
+0 forum 4

hey i heard that there is something called qt signals you can use it to change the GUI out side the main thread coz when i try to change it i get an error that i cant change the gui out of the main thread but i need it to edit the progressbar value so if anyone had a way to do it plz tell me

Member Avatar
Member Avatar
+0 forum 9

I'm trying to print the contents of a QTableView to the printer . i implement bottom script and it run successfully without any error. but all data are Unusual in printPreview. this is [pic](http://img4up.com/up2/75917679167425743216.png) from my problem -[FOUNTAIN](http://www.qtcentre.org/threads/3796-QTableView-printing?highlight=Qprinter) def printTable(self,printer,painter,area): model = self.model myTableView = self.view printer = painter rows = model.rowCount(); columns = model.columnCount(); totalWidth = 0.0; totalPageHeight = 0.0; totalHeight = 0.0; for c in range(columns): totalWidth += myTableView.columnWidth(c) for p in range(45): totalPageHeight += myTableView.rowHeight(p); for r in range(rows): totalHeight += myTableView.rowHeight(r); xscale = area.width() / totalWidth; yscale = area.height() / totalHeight; pscale = area.height() / totalPageHeight; …

Member Avatar
+0 forum 0

Hi guys, still Noob here, so i apologize for not using the correct terminology. I will be as detailed and accurate as possible! I've been using QT Designer, and been trying to figure out how to "combine" the GUI ive created with the python script I wrote before making a GUI. I had my .py script made before I even knew about PyQT, QtGUI, and Qt Designer. My understanding on modules, classes, and objects are weak to say the least, as is my understanding on python also. After visiting [url]http://www.riverbankcomputing.co.uk/software/pyqt/intro[/url] I have a much better understanding of PyQT's modules classes …

Member Avatar
Member Avatar
+0 forum 9

The End.