Embed python into c++ Qt applications. Should be used for embedding Python code into c++ rather than writing c++ applications in Python.
Questions tagged [pythonqt]
27 questions
7
votes
1 answer
Using okular in a Python app : hiding the side pannel
I am developing a program (TeXamator) in Python to deal with exercises databases in LaTeX. Following this answer I have been able to successfully embed okular into my Qt app.
The problem is that I can't find how to access the sidebar and hide it. If…

Alexis
- 73
- 8
2
votes
3 answers
Find item in QApplication by only the objectname
i want to find any object by a objectname string name inside of the QApplication
Something like
QApplication.instance().findByClassName("codeEditor")
which should return a list of widgets with this classname that i can iterate over if there is…

Bluscream
- 255
- 1
- 3
- 18
1
vote
0 answers
Using PythonQT: Fatal Python error: Py_Initialize: unable to load the file system codec
I have inherited a project. I can get it to compile but I am running into this runtime error. I have uninstalled all other versions of python on my machine except for the version that came with the application. Does anyone know why this error could…

Warthou
- 11
- 1
1
vote
1 answer
Making realtime output on PythonQT and send key input to the command
I need some help or/and suggestions here, I'm making a Python program with GUI using pyQT, but I need to output realtime subprocess command into a textbrowser, so that way the user could see if there's any error and the message error, alternative…

Klairm
- 31
- 4
1
vote
1 answer
PythonQt: How the heck do I actually install it?
I am trying to install PythonQt for a Qt 5.12 application that I am building on windows. Unfortunately, the documentation is super sparse, and I am not at all familiar with using external libraries in my code, or with building projects at all for…

Danny
- 354
- 3
- 13
1
vote
0 answers
PythonQT, QMenu update QActions
I've got the following code which was working well before I updated utils._DATA twice. Utils._DATA is dictionary.
class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
def __init__(self, icon, parent=None):
super(SystemTrayIcon,…

Константин Мебиус
- 11
- 4
1
vote
1 answer
Passing numpy object to pythonqt wrapper
I have a c++ class myClass and I'm trying to have a creator based on a numpy array.
Here is the wrapper defining the new_ python creator taking PyObject as argument:
class myClassPyWrapper : public QObject {
Q_OBJECT
public slots:
/*... many…

bibi
- 3,671
- 5
- 34
- 50
1
vote
1 answer
How to use appimage to deploy qt5 application
I'm using appimage http://appimage.org to pack my application in a standalone excutable.
I'm doint this on debian testing lenny.
My application uses a lot of opensource libraries (qt, python pythonqt fftw hdf4/5 gsl netpbm qwt) and everything was ok…

bibi
- 3,671
- 5
- 34
- 50
0
votes
0 answers
How can I stop QBarGraph data going off the edge of the graph?
I am using PySide2.QtCharts in order to get a graph to display.
I have scoured the internet for hours and nobody else appears to have this problem, which means it's either ridiculously obscure, or that I'm missing something painfully obvious.
The…

Frewerr
- 1
0
votes
0 answers
Operator "|" not supported for types "AlignmentFlag" and "AlignmentFlag"
Can someone please indicate how to solve operator OR is not supported for types AlignmentFlag? Below is my Qt python function for reference:
def data(self, index, role):
if role == Qt.BackgroundRole:
row = index.row()
color =…

B. Mazeran
- 33
- 1
- 5
0
votes
1 answer
QTile set position for window
My problem is that I want to have a specific wm_class spawn at a specific X and Y position on my screen every time it opens (Floating window).
I read the documentation, but couldn't figure out a way.
I was trying to use the…

Eko450
- 1
0
votes
0 answers
Using PythonQt wrap function that accepts custom class binded with pybind11
I have a C++ class MyClass that is binded to python using pybind11. Thus MyClass resides in python module named mymodule. That means from python I can do:
import mymodule
my_class = mymodule.MyClass()
Also I have C++ class YourClass:
class…

Kerim
- 171
- 3
- 10
0
votes
1 answer
How to build PythonQt in ubutnu
I want to embed the python script in my c++ Qt application, By searching on the net I found that PythonQt is exactly what I am looking for but when I went to it's github repo there is build description given for windows system but not for ubuntu…

Vinay Kumar
- 674
- 2
- 9
- 21
0
votes
1 answer
How to build PythonQT on Mac
I'm trying to build QT app with python embedded by PythonQT but stuck at building PythonQT.
Here is my environment and what I did:
mac os 10.15
python 3.8.5 installed by homebrew
python-dev-tools installed by pip
QT 5.15
download PythonQT source…

user3153765
- 373
- 4
- 14
0
votes
0 answers
In C++ PythonQT, How to the variable name used in each thread is the same, but how do you use the value differently?
I am using multithreading PythonQT in C++.
When using values of the same name in different threads, I want to use different values.
Help me plz...
[Code : run multithreading]
int nRet = PyEval_ThreadsInitialized();
if (Py_IsInitialized() == 0)
{
…

speedjwt
- 1