generate pdf from the data generated from the pyside application
I have created a invoice calculator using pyside.In the application get Invoice button is provided . I want that when this get invoice button is clicked a pdf should be generated and saved on users desktop. Since I am new to pyside I don't know how it can be done.
interface of the application:
See also questions close to this topic
- what's the different open Picture file python2 open.read and python3 open.read
How to find sum of integers generated in a while loop
salary = 1000 interest = 0.002 * salary x = 0 while x < 12: yes = 0.15 * salary salary += interest x += 1
Above is what I have I would like to print the sum of yes after the loop is done, I tried y = yes += yes print(y) this didn't work
How do I implement the counter from this for cycle to a list by comprehension?
How can i write this code
`def Serie_a(n): Serie_a =  m=0 for i in [1..n]: m = m + 1/i Serie_a.append(m) print Serie_a`
in the form of a list by comprehension?
Spawn a separate process not dependent on the current one
I have a python process running. What I want to do is spawn an entirely separate process that is not dependent on the current one that spawned it.
Basically I have a QT app showing a timer until it closes itself (and other similar processes). Right before it does close, im going to save some data, and what i want to do is spawn a separate process that launches a simple QT Dialog showing where those saves went, but then immediately kill the current process.
In every way I try right now, the code runs but then when the current process is killed, the one i spawned to show save locations is killed along with it.
Whats the best way to do this so the new simple info window stays alive when the parent process that created it dies?
Thanks in advance!
Edit: No this is not a duplicate. using 'nohup' on a subprocess does not work. From reading about it, i cant tell if A) It is just flat out not working for me, no matter what variation i try, or B) if its running but hidden - but whatever it is, it does not spawn the secondary dialog i need, detached from the current process.
Edit 2: For some reason using nohup seems to append a // to my first command in line - so it wasnt finding the path to python27. managed to fix it by removing extra quotations in that string, and flipping the / to \ for the path
This did in fact work, thanks!
Pyinstaller: Failed to execute script pyi_rth_qt4plugins
When I run my .exe which is created by pyinstaller, it has the error message which is shown in the below screenshot.
I use Python 3.6.4, pyinstaller 3.4 and PyQt5 5.12 to make my GUI program in Windows 10. Why does the .exe need the PySide module and PyQt4 when I run the .exe? I don't understand it. The .py can run without any bugs.
Actually, before I got this error I had the error
Exception:Cannot find PyQt4 plugin directoriesduring the process the exe is being produced, but I thought I didn't need PyQt4 so I uninstalled it. Then the pyinstaller process continued until I got a new error.
Exception: Cannot find existing PyQt5 plugin directories Paths checked: C:/qt64/qt_1544645195969/_h_env/Library/plugins
I solved it by copying the pyqt5qmlplugin.dll to the path mentioned above
C:/qt64/qt_1544645195969/_h_env/Library/plugins. Finally I got the .exe, but unfortunately I still got an error which is shown in the screenshot, and I can't install PyQt4 with pip. It reports:
Could not find a version that satisfies the requirement PyQt4 (from versions: ) No matching distribution found for PyQt4
I also can't install PySide because
only these Python versions are supported: [(2.6), (2.7), (3.2), (3.3), (3.4)].
PySide: ImportError: cannot import name QtOpenGL
from PySide import QtOpenGL ImportError: cannot import name QtOpenGL
The only thing I see is that the source folder of
PySidethat contains some QtOpenGL folder, which is not present after the build.
Exactly the same issue as this one, but 4 years later and nobody didn't respond: https://forum.qt.io/topic/48792/pyside-qtopengl-not-found