How to make PyQt window state to maximised in pyqt
From the docs: self.showMaximized()
From the docs: self.showMaximized()
Updated version of @Alaaedeen’s answer. You can specify any part of the version of any package you want to install. This may cause other package versions to change. For example, if you don’t care about which specific version of PyQt4 you want, do: conda install pyqt=4 This would install the latest minor version and release … Read more
Here is a working example of a separate worker thread which can send and receive signals to allow it to communicate with a GUI. I made two simple buttons, one which starts a long calculation in a separate thread, and one which immediately terminates the calculation and resets the worker thread. Forcibly terminating a thread … Read more
The answer to your question’s title is “yes”: I recommend never using from … import *, and I discussed the reasons in another very recent answer. Briefly, qualified names are good, barenames are very limited, so the “third option” is optimal (as you’ll be using qualified names, not barenames) among those you present. (Advantages of … Read more
The issue is that you’re pickling objects defined in Settings by actually running the ‘Settings’ module, then you’re trying to unpickle the objects from the GUI module. Remember that pickle doesn’t actually store information about how a class/object is constructed, and needs access to the class when unpickling. See wiki on using Pickle for more … Read more
You can convert the QString type to python string by just using the str function. Assuming you are not using any Unicode characters you can get a python string as below: text = str(combobox1.currentText()) If you are using any unicode characters, you can do: text = unicode(combobox1.currentText())
Had a similar problem with no module named FileDialog. Discovered that with version 3.2, I could use pyinstaller –hidden-import FileDialog … instead of modifying my main script. See Listing Hidden Imports documentation
You need to call QtCore.pyqtRemoveInputHook. I wrap it in my own version of set_trace: def debug_trace(): ”’Set a tracepoint in the Python debugger that works with Qt”’ from PyQt4.QtCore import pyqtRemoveInputHook # Or for Qt5 #from PyQt5.QtCore import pyqtRemoveInputHook from pdb import set_trace pyqtRemoveInputHook() set_trace() And when you are done debugging, you can call QtCore.pyqtRestoreInputHook(), … Read more
My first suggestion is to use Qt Designer to create your GUIs. Typing them out yourself sucks, takes more time, and you will definitely make more mistakes than Qt Designer. Here are some PyQt tutorials to help get you on the right track. The first one in the list is where you should start. A … Read more
It should be enough to create an empty virtualenv and then copy the contents of the …/site-packages/PyQt4 directories into it. I suggest to install PyQt4 once globally, make a copy of the directory, uninstall it and then use this trick to create VEs.