{"id":12315,"date":"2025-12-01T14:03:23","date_gmt":"2025-12-01T13:03:23","guid":{"rendered":"https:\/\/www.basyskom.de\/?p=12315"},"modified":"2025-12-01T14:03:24","modified_gmt":"2025-12-01T13:03:24","slug":"boosting-pyside-with-c-models","status":"publish","type":"post","link":"https:\/\/www.basyskom.de\/en\/boosting-pyside-with-c-models\/","title":{"rendered":"Boosting PySide with C++ models"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"12315\" class=\"elementor elementor-12315\" data-elementor-post-type=\"post\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7b8a3f5 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"7b8a3f5\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c1317ff elementor-widget elementor-widget-heading\" data-id=\"c1317ff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Motivation<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-c5f5500 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"c5f5500\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d0a6f8f elementor-widget elementor-widget-text-editor\" data-id=\"d0a6f8f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In some areas, performance issues can be problematic: In particular, <em>QAbstractItemModels<\/em> may be a bottleneck for the following reasons:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f64769f e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"f64769f\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-7af9657 elementor-widget elementor-widget-text-editor\" data-id=\"7af9657\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<ul><li>A typical pattern in the <em>data()<\/em> override in <em>QAbstractItemModel<\/em> implementations is to check for the role (like the <em>DisplayRole<\/em>, the <em>BackgroundRole<\/em> for the background color, the <em>DecorationRole<\/em> for an icon displayed next to the text fetched from the <em>DisplayRole<\/em>, etc. &#8230;). Often columns and rows are treated differently in tabular models, so the checks can get quite complex, resulting in long nested <em>if-elif-else<\/em> code flows.<\/li><li>Data from C++ needs to get converted when it is forwarded to Python, and vice versa. This is particularly the case for <em>QStrings<\/em> that are returned in <em>QAbstractItemModel<\/em> methods like <em>data()<\/em>, <em>headerData()<\/em>, etc. The string representation that Python uses is described in <a href=\"https:\/\/peps.python.org\/pep-0393\/\" target=\"_blank\" rel=\"noopener\">PEP 393<\/a>, <em>QStrings<\/em> are stored as UTF-16 internally. In C++ it is considered good practise to make use of <a href=\"https:\/\/doc.qt.io\/qt-6\/qt-literals-stringliterals.html\" target=\"_blank\" rel=\"noopener\">string literals<\/a> to create UTF-16 strings at compile time. But when jumping between the Qt\/C++ and the Python\/PySide6 worlds, a lot of string conversions have to be done at runtime.<\/li><li>In practice, <em>QAbstractItemModels<\/em> often are responsible to fetch data from specific backends. Especially in embedded environments these backends may only available in C++ in the first place. Sometimes data has to get processed which slows down the model implementation even further.<\/li><\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-9cbbb38 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"9cbbb38\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-55e6132 elementor-widget elementor-widget-heading\" data-id=\"55e6132\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Extend PySide with C++<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-7207ee4 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"7207ee4\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-eaec5aa elementor-widget elementor-widget-text-editor\" data-id=\"eaec5aa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Enter <a href=\"https:\/\/doc.qt.io\/qtforpython-6\/shiboken6\/index.html\" target=\"_blank\" rel=\"noopener\">Shiboken<\/a>, the official tool for generating Qt bindings for Python. It can be installed with pip:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-5b44a9c e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"5b44a9c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ff91cf7 elementor-widget elementor-widget-elementor-syntax-highlighter\" data-id=\"ff91cf7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-syntax-highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre><code class='language-bash'>pip install shiboken6 pyside6 shiboken6_generator <\/code><\/pre><script>\nif (!document.getElementById('syntaxed-prism')) {\n\tvar my_awesome_script = document.createElement('script');\n\tmy_awesome_script.setAttribute('src','https:\/\/www.basyskom.de\/wp-content\/plugins\/syntax-highlighter-for-elementor\/assets\/prism2.js');\n\tmy_awesome_script.setAttribute('id','syntaxed-prism');\n\tdocument.body.appendChild(my_awesome_script);\n} else {\n\twindow.Prism && Prism.highlightAll();\n}\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-7ca937c e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"7ca937c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9bf0f15 elementor-widget elementor-widget-text-editor\" data-id=\"9bf0f15\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Unfortunately, Shiboken has a relatively steep learning curve and makes the build process more complex. To find a starting point, it is easiest to first download the CMakeLists.txt from the <a href=\"https:\/\/doc.qt.io\/qtforpython-6\/examples\/example_widgetbinding_widgetbinding.html\" target=\"_blank\" rel=\"noopener\">wiggly example<\/a>, and just adapt it to your needs. It&#8217;s also imperative to ensure that you compile the C++ source files agains the same Qt version that Shiboken uses &#8211; otherwise you you might descend into a hell of missing includes later on. In this example I am using Qt 6.10.<\/p>\n<p>\u00a0<\/p>\n<p>To keep the example simple, let&#8217;s implement a very basic model (in this example the model inherits from <em>QAbstractTableModel<\/em>):<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-902b827 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"902b827\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-29744eb elementor-widget elementor-widget-elementor-syntax-highlighter\" data-id=\"29744eb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-syntax-highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre><code class='language-cpp'>#include &quot;tablemodel.h&quot;\n \n#include &lt;QString&gt;\n#include &lt;QColor&gt;\n#include &lt;QDebug&gt;\n \nusing namespace Qt::StringLiterals;\n \nTableModel::TableModel(QObject *parent)\n    : QAbstractTableModel(parent)\n{\n}\n \nint TableModel::rowCount(const QModelIndex &amp;) const\n{\n    return 1000;\n}\nint TableModel::columnCount(const QModelIndex &amp;) const\n{\n    return 100;\n}\n \nQVariant TableModel::data(const QModelIndex &amp;index, int role) const\n{\n    std::vector&lt;QColor&gt; backgroundPalette = {\n        QColor(u&quot;#D97D55&quot;_s),\n        QColor(u&quot;#F4E9D7&quot;_s),\n        QColor(u&quot;#B8C4A9&quot;_s),\n        QColor(u&quot;#6FA4AF&quot;_s)\n    };\n    if (role == Qt::DisplayRole) {\n        return u&quot;(%1, %2)&quot;_s.arg(index.row() + 1).arg(index.column() + 1);\n    } else if (role == Qt::ToolTipRole) {\n        return u&quot;Row: %1 - Column: %2)&quot;_s.arg(index.row() + 1).arg(index.column() + 1);\n    } else if (role == Qt::BackgroundRole) {\n        return backgroundPalette.at(index.row() % backgroundPalette.size());\n    } else if (role == Qt::ForegroundRole) {\n        return QColor(Qt::black);\n    }\n    return QVariant();\n}\n \nQVariant TableModel::headerData(int section, Qt::Orientation orientation, int role) const\n{\n    if (orientation == Qt::Horizontal &amp;&amp; role == Qt::DisplayRole) {\n        return u&quot;Section: %1&quot;_s.arg(section + 1);\n    }\n    return QAbstractTableModel::headerData(section, orientation, role);\n} <\/code><\/pre><script>\nif (!document.getElementById('syntaxed-prism')) {\n\tvar my_awesome_script = document.createElement('script');\n\tmy_awesome_script.setAttribute('src','https:\/\/www.basyskom.de\/wp-content\/plugins\/syntax-highlighter-for-elementor\/assets\/prism2.js');\n\tmy_awesome_script.setAttribute('id','syntaxed-prism');\n\tdocument.body.appendChild(my_awesome_script);\n} else {\n\twindow.Prism && Prism.highlightAll();\n}\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-59c2dc8 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"59c2dc8\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-c20183f elementor-widget elementor-widget-text-editor\" data-id=\"c20183f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>I skip the header as it is very straightforward. What&#8217;s more important, is that we need to tell Shiboken about the bindings to generate. Therefore we need to create a file named binding.xml:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f504586 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"f504586\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-87ef3a5 elementor-widget elementor-widget-elementor-syntax-highlighter\" data-id=\"87ef3a5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-syntax-highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre><code class='language-solid'>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;\n \n&lt;typesystem package=&quot;modelbinding&quot;&gt;\n    &lt;load-typesystem name=&quot;typesystem_widgets.xml&quot; generate=&quot;no&quot;\/&gt;\n    &lt;load-typesystem name=&quot;typesystem_core.xml&quot; generate=&quot;no&quot;\/&gt;\n    &lt;load-typesystem name=&quot;typesystem_gui.xml&quot; generate=&quot;no&quot;\/&gt;\n    &lt;object-type name=&quot;TableModel&quot;\/&gt;\n&lt;\/typesystem&gt; <\/code><\/pre><script>\nif (!document.getElementById('syntaxed-prism')) {\n\tvar my_awesome_script = document.createElement('script');\n\tmy_awesome_script.setAttribute('src','https:\/\/www.basyskom.de\/wp-content\/plugins\/syntax-highlighter-for-elementor\/assets\/prism2.js');\n\tmy_awesome_script.setAttribute('id','syntaxed-prism');\n\tdocument.body.appendChild(my_awesome_script);\n} else {\n\twindow.Prism && Prism.highlightAll();\n}\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-58015c5 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"58015c5\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-021e40a elementor-widget elementor-widget-text-editor\" data-id=\"021e40a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Note that we need to load the type systems for all Qt modules that you are using. The wiggly example I linked above only adds the type system for the widget module. On the other hand, <em>QAbstractItemModel<\/em> is part of Qt core, so the corresponding line must be included here also.<\/p><p>\u00a0<\/p><p>Last but not least, the file <em>binding.h<\/em> is also needed. It looks as following:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-7c03f3c e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"7c03f3c\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-028460f elementor-widget elementor-widget-elementor-syntax-highlighter\" data-id=\"028460f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-syntax-highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre><code class='language-c'>#ifndef BINDINGS_H\n#define BINDINGS_H\n#include &quot;src\/tablemodel.h&quot;\n#endif \/\/ BINDINGS_H <\/code><\/pre><script>\nif (!document.getElementById('syntaxed-prism')) {\n\tvar my_awesome_script = document.createElement('script');\n\tmy_awesome_script.setAttribute('src','https:\/\/www.basyskom.de\/wp-content\/plugins\/syntax-highlighter-for-elementor\/assets\/prism2.js');\n\tmy_awesome_script.setAttribute('id','syntaxed-prism');\n\tdocument.body.appendChild(my_awesome_script);\n} else {\n\twindow.Prism && Prism.highlightAll();\n}\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-06a07fb e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"06a07fb\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-099a435 elementor-widget elementor-widget-heading\" data-id=\"099a435\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Building<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-f1bae85 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"f1bae85\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-83839e3 elementor-widget elementor-widget-text-editor\" data-id=\"83839e3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Create a build folder, run cmake and then make install &#8211; the installation step is necessary to copy the binding libraries to the project folder:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-0ba1187 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"0ba1187\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4966121 elementor-widget elementor-widget-elementor-syntax-highlighter\" data-id=\"4966121\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-syntax-highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre><code class='language-bash'>mkdir build &amp;&amp; cd build\ncmake -DCMAKE_PREFIX_PATH=~\/Qt\/6.10.0\/gcc_64\/ ..\nmake install <\/code><\/pre><script>\nif (!document.getElementById('syntaxed-prism')) {\n\tvar my_awesome_script = document.createElement('script');\n\tmy_awesome_script.setAttribute('src','https:\/\/www.basyskom.de\/wp-content\/plugins\/syntax-highlighter-for-elementor\/assets\/prism2.js');\n\tmy_awesome_script.setAttribute('id','syntaxed-prism');\n\tdocument.body.appendChild(my_awesome_script);\n} else {\n\twindow.Prism && Prism.highlightAll();\n}\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-7dcc7f4 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"7dcc7f4\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5f9d437 elementor-widget elementor-widget-text-editor\" data-id=\"5f9d437\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Pitfalls: Shiboken uses clang to parse the c++ header files and generate the bindings. I had to export <em>CLANG_INSTALL_DIR<\/em> to point Shiboken to the clang installation.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-c8c5adc e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"c8c5adc\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-9440968 elementor-widget elementor-widget-elementor-syntax-highlighter\" data-id=\"9440968\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-syntax-highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre><code class='language-bash'>export CLANG_INSTALL_DIR=\/usr\/lib\/llvm-18 <\/code><\/pre><script>\nif (!document.getElementById('syntaxed-prism')) {\n\tvar my_awesome_script = document.createElement('script');\n\tmy_awesome_script.setAttribute('src','https:\/\/www.basyskom.de\/wp-content\/plugins\/syntax-highlighter-for-elementor\/assets\/prism2.js');\n\tmy_awesome_script.setAttribute('id','syntaxed-prism');\n\tdocument.body.appendChild(my_awesome_script);\n} else {\n\twindow.Prism && Prism.highlightAll();\n}\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-d6c71c6 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"d6c71c6\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-93a6a30 elementor-widget elementor-widget-text-editor\" data-id=\"93a6a30\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>If you don&#8217;t use Qt 6.10, you might run into a cmake error telling you that cmake cannot find <em>Shiboken6ToolsConfig.cmake<\/em> &#8211; in this case, check the wiggly example for your Qt version, download the utils script and adapt <em>CMakeLists.txt<\/em> accordingly.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-3cb3346 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"3cb3346\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8dc4400 elementor-widget elementor-widget-heading\" data-id=\"8dc4400\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Test<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-37f27a8 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"37f27a8\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-bfcf5d4 elementor-widget elementor-widget-text-editor\" data-id=\"bfcf5d4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>After you have installed the compiled binding libraries (in the example <em>libmodelbinding.so<\/em> and <em>modelbinding.abi3.so<\/em>), you can use your C++ model in you PySide6 project:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-ce4ecca e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"ce4ecca\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f60adfa elementor-widget elementor-widget-elementor-syntax-highlighter\" data-id=\"f60adfa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"elementor-syntax-highlighter.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<pre><code class='language-python'>import sys\nimport time\n \nfrom PySide6.QtCore import QObject\nfrom PySide6.QtGui import QPaintEvent\n \nfrom PySide6.QtWidgets import (\n    QApplication,\n    QWidget,\n    QTableView,\n    QPushButton,\n    QVBoxLayout,\n)\n \n# Python binding from the C++ QAbstractItemModel\nfrom modelbinding import TableModel\n \nclass TableView(QTableView):\n    def __init__(self, parent=None):\n        super().__init__(parent)\n        self.elapsed_times = []\n        self.warmup = 3\n \n    def paintEvent(self, event: QPaintEvent) -&gt; None:\n        start_time = time.time()\n        super().paintEvent(event)\n        elapsed_ms = (time.time() - start_time) * 1000\n        print(f&#039;Time in Paint Event: {elapsed_ms:.6f} ms&#039;)\n        if self.warmup:\n            self.warmup -= 1\n        else:\n            self.elapsed_times.append(elapsed_ms)\n \n    def printAverageElapsedTimes(self):\n        if len(self.elapsed_times) &gt; 0:\n            print(f&#039;Avg elapsed times: {(sum(self.elapsed_times) \/ len(self.elapsed_times)):.6f}&#039;)\n \n \nif __name__ == &quot;__main__&quot;:\n    app = QApplication()\n    w = QWidget()\n \n    w.resize(1600, 1600)\n    layout = QVBoxLayout()\n \n    table_model = TableModel()\n    table_view = TableView()\n    table_view.setModel(table_model)\n \n    quit_button = QPushButton(QObject.tr(&quot;Quit&quot;))\n    quit_button.clicked.connect(app.quit)\n    app.aboutToQuit.connect(table_view.printAverageElapsedTimes)\n \n    layout.addWidget(table_view)\n    layout.addWidget(quit_button)\n \n    w.setLayout(layout)\n \n    w.show()\n    sys.exit(app.exec()) <\/code><\/pre><script>\nif (!document.getElementById('syntaxed-prism')) {\n\tvar my_awesome_script = document.createElement('script');\n\tmy_awesome_script.setAttribute('src','https:\/\/www.basyskom.de\/wp-content\/plugins\/syntax-highlighter-for-elementor\/assets\/prism2.js');\n\tmy_awesome_script.setAttribute('id','syntaxed-prism');\n\tdocument.body.appendChild(my_awesome_script);\n} else {\n\twindow.Prism && Prism.highlightAll();\n}\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-8350679 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"8350679\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-0fbdb57 elementor-widget elementor-widget-text-editor\" data-id=\"0fbdb57\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>When you start the application, you should see the table with the data from the C++ model:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-9dfa517 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"9dfa517\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-8a8014c elementor-widget elementor-widget-image\" data-id=\"8a8014c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"800\" height=\"717\" src=\"https:\/\/www.basyskom.de\/wp-content\/uploads\/2025\/10\/PySide-C_Model__TableView-1024x918.png\" class=\"attachment-large size-large wp-image-12319\" alt=\"basysKom, HMI Dienstleistung, Qt, Cloud, Azure\" srcset=\"https:\/\/www.basyskom.de\/wp-content\/uploads\/2025\/10\/PySide-C_Model__TableView-1024x918.png 1024w, https:\/\/www.basyskom.de\/wp-content\/uploads\/2025\/10\/PySide-C_Model__TableView-300x269.png 300w, https:\/\/www.basyskom.de\/wp-content\/uploads\/2025\/10\/PySide-C_Model__TableView-768x689.png 768w, https:\/\/www.basyskom.de\/wp-content\/uploads\/2025\/10\/PySide-C_Model__TableView-1536x1378.png 1536w, https:\/\/www.basyskom.de\/wp-content\/uploads\/2025\/10\/PySide-C_Model__TableView-13x12.png 13w, https:\/\/www.basyskom.de\/wp-content\/uploads\/2025\/10\/PySide-C_Model__TableView-560x502.png 560w, https:\/\/www.basyskom.de\/wp-content\/uploads\/2025\/10\/PySide-C_Model__TableView.png 1599w\" sizes=\"(max-width: 800px) 100vw, 800px\">\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-1595653 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"1595653\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-4413d5a elementor-widget elementor-widget-text-editor\" data-id=\"4413d5a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Here, I set the window size to 1600\u00d71600 to display multiple table cells in the view which results to many <em>data()<\/em> calls \u2013 this makes performance measurement more meaningful. The average time spent within paintEvents (where display, decoration, foreground, and background roles are typically obtained by the underlying delegate) is printed on the console when the application exits. The model is relatively simple yet when scrolling through the view we can still observe a noticeable improvement in performance. Moreover, not only is it quicker, it is also much more consistent with significantly fewer spikes. While this sounds like garbage collection taking place, disabling it had mo discernible effect. Measured on my computer, 1 or 2 ms might not seem like much but that\u2019s still 6 to 12 percent of a single frame on a 60 Hz display: time that you can now spend on doing other things. The difference can of course be much more pronounced on weaker machines.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-c51e027 e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"c51e027\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-78a6ed0 elementor-widget elementor-widget-line_chart\" data-id=\"78a6ed0\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"line_chart.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div role=\"img\" class=\"chart-card\">\n\t<div>\n\t\t\t\t\t<h4 class=\"heading graphina-chart-heading\">\n\t\t\t\tTime spent in paintEvent (ms)\t\t\t<\/h4>\n\t\t\n\t\t\t<\/div>\n\t<div class=\"chart-box\">\n    <div class=\"graphina-elementor-chart \"\n        data-chart_type=\"line\"\n        data-common_filter_id=\"\"\n        data-element_id=\"78a6ed0\"\n        data-chart_options=\"{&quot;series&quot;:[{&quot;name&quot;:&quot;Python Model&quot;,&quot;data&quot;:[4.525661,2.802372,2.846479,3.574371,4.667044,3.193378,4.013538,3.128052,3.628731,2.870798,2.565861,2.447128,3.290176,3.341913,2.388477,3.210306,2.898693,5.851269,5.249977,8.387327,2.388716,2.650499,3.404379,4.934072,4.927397,2.98667,2.7349,2.280951,3.109217,4.074812,3.363132,3.102303,3.067255,3.268003,5.290031,2.650738,2.606392,4.891396,4.635096,2.82526,2.442598,2.92635,3.023148,5.260706,7.239342,7.823467,3.278971,5.058765,5.495787,2.533197,2.650738,2.858877,6.645918,3.072739,3.041744,3.154278,4.651546,5.557299,6.436348,8.444548,3.853083,3.079891,4.310608,7.889032,5.281448,2.807856,3.968,3.172159,5.977154,6.719112,8.676767,2.734423,4.192591,2.570391,5.67174,9.518623,4.228354,3.091812,2.923727,5.190849,7.663965],&quot;yaxis&quot;:0},{&quot;name&quot;:&quot;C++ Model&quot;,&quot;data&quot;:[2.558231,1.622677,1.703262,2.718925,2.074242,1.746655,1.957893,1.927137,2.137423,1.680851,1.382828,1.637459,1.467228,1.816988,1.754522,3.78561,2.873182,2.023697,1.818657,2.066612,1.707077,1.734495,1.91164,2.789974,1.945734,2.680779,1.513243,1.450777,1.431227,1.318455,2.051353,2.398968,1.889706,1.724482,1.866102,2.086401,1.707792,2.103329,1.888037,1.583099,2.014637,1.835108,1.581907,1.516581,2.327681,1.94478,1.477242,2.269268,1.832724,1.724005,7.524014,2.394676,2.71821,2.871037,1.750469,1.775503,1.548767,1.726627,1.332998,1.558781,1.444817,1.99604,1.896858,1.756191,2.195835,2.515793,1.892328,1.665592,1.84226,1.779079,1.766682,1.663208,1.976728,9.720087,1.725674,2.19202,1.708508,2.422094,1.709938,1.674175,2.392769,3.135681],&quot;yaxis&quot;:0}],&quot;chart&quot;:{&quot;id&quot;:&quot;78a6ed0&quot;,&quot;background&quot;:&quot;&quot;,&quot;height&quot;:350,&quot;type&quot;:&quot;line&quot;,&quot;stacked&quot;:&quot;&quot;,&quot;toolbar&quot;:{&quot;offsetX&quot;:0,&quot;offsetY&quot;:0,&quot;show&quot;:false,&quot;export&quot;:{&quot;csv&quot;:{&quot;filename&quot;:&quot;&quot;},&quot;svg&quot;:{&quot;filename&quot;:&quot;&quot;},&quot;png&quot;:{&quot;filename&quot;:&quot;&quot;}},&quot;tools&quot;:{&quot;download&quot;:false}},&quot;dropShadow&quot;:{&quot;enabled&quot;:false,&quot;top&quot;:0,&quot;left&quot;:0,&quot;blur&quot;:0,&quot;color&quot;:&quot;&quot;,&quot;opacity&quot;:0},&quot;animations&quot;:{&quot;enabled&quot;:true,&quot;speed&quot;:800,&quot;delay&quot;:150},&quot;locales&quot;:[{&quot;name&quot;:&quot;en_US&quot;,&quot;options&quot;:{&quot;toolbar&quot;:{&quot;download&quot;:&quot;Download SVG&quot;,&quot;selection&quot;:&quot;Selection&quot;,&quot;selectionZoom&quot;:&quot;Selection Zoom&quot;,&quot;zoomIn&quot;:&quot;Zoom In&quot;,&quot;zoomOut&quot;:&quot;Zoom Out&quot;,&quot;pan&quot;:&quot;Panning&quot;,&quot;reset&quot;:&quot;Reset Zoom&quot;,&quot;menu&quot;:&quot;Menu&quot;,&quot;exportToSVG&quot;:&quot;Download SVG&quot;,&quot;exportToPNG&quot;:&quot;Download PNG&quot;,&quot;exportToCSV&quot;:&quot;Download CSV&quot;},&quot;months&quot;:[&quot;January&quot;,&quot;February&quot;,&quot;March&quot;,&quot;April&quot;,&quot;May&quot;,&quot;June&quot;,&quot;July&quot;,&quot;August&quot;,&quot;September&quot;,&quot;October&quot;,&quot;November&quot;,&quot;December&quot;],&quot;shortMonths&quot;:[&quot;Jan&quot;,&quot;Feb&quot;,&quot;Mar&quot;,&quot;Apr&quot;,&quot;May&quot;,&quot;Jun&quot;,&quot;Jul&quot;,&quot;Aug&quot;,&quot;Sep&quot;,&quot;Oct&quot;,&quot;Nov&quot;,&quot;Dec&quot;],&quot;days&quot;:[&quot;Sunday&quot;,&quot;Monday&quot;,&quot;Tuesday&quot;,&quot;Wednesday&quot;,&quot;Thursday&quot;,&quot;Friday&quot;,&quot;Saturday&quot;],&quot;shortDays&quot;:[&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;]}}],&quot;defaultLocale&quot;:&quot;en_US&quot;},&quot;xaxis&quot;:{&quot;tickAmount&quot;:6,&quot;tickPlacement&quot;:&quot;on&quot;,&quot;position&quot;:&quot;bottom&quot;,&quot;labels&quot;:{&quot;show&quot;:true,&quot;rotateAlways&quot;:false,&quot;rotate&quot;:0,&quot;offsetX&quot;:0,&quot;offsetY&quot;:0,&quot;trim&quot;:true,&quot;style&quot;:{&quot;colors&quot;:&quot;#000000&quot;,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontFamily&quot;:&quot;Poppins&quot;,&quot;fontWeight&quot;:&quot;&quot;}},&quot;tooltip&quot;:{&quot;enabled&quot;:false},&quot;crosshairs&quot;:{&quot;show&quot;:false},&quot;label&quot;:{&quot;style&quot;:{&quot;colors&quot;:&quot;#000000&quot;}},&quot;categories&quot;:[&quot;&quot;]},&quot;colors&quot;:[&quot;#3499FF&quot;,&quot;#EF7D00&quot;],&quot;yaxis&quot;:{&quot;tickAmount&quot;:6,&quot;decimalsInFloat&quot;:1,&quot;labels&quot;:{&quot;show&quot;:true,&quot;offsetX&quot;:0,&quot;offsetY&quot;:0,&quot;rotate&quot;:0,&quot;style&quot;:{&quot;colors&quot;:&quot;#000000&quot;,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontFamily&quot;:&quot;Poppins&quot;,&quot;fontWeight&quot;:&quot;&quot;}},&quot;tooltip&quot;:{&quot;enabled&quot;:false},&quot;crosshairs&quot;:{&quot;show&quot;:false},&quot;opposite&quot;:false,&quot;label&quot;:{&quot;style&quot;:{&quot;colors&quot;:&quot;#000000&quot;}}},&quot;legend&quot;:{&quot;showForSingleSeries&quot;:true,&quot;show&quot;:true,&quot;position&quot;:&quot;bottom&quot;,&quot;horizontalAlign&quot;:&quot;center&quot;,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontFamily&quot;:&quot;Poppins&quot;,&quot;fontWeight&quot;:&quot;&quot;,&quot;labels&quot;:{&quot;colors&quot;:&quot;#000000&quot;}},&quot;dataLabels&quot;:{&quot;enabled&quot;:false,&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontFamily&quot;:&quot;Poppins&quot;,&quot;fontWeight&quot;:&quot;&quot;,&quot;colors&quot;:[null]},&quot;background&quot;:{&quot;enabled&quot;:false,&quot;borderRadius&quot;:0,&quot;foreColor&quot;:&quot;#ffffff&quot;,&quot;borderWidth&quot;:1,&quot;borderColor&quot;:&quot;#ffffff&quot;},&quot;offsetY&quot;:0,&quot;offsetX&quot;:0},&quot;noData&quot;:{&quot;text&quot;:&quot;No Data Available&quot;,&quot;align&quot;:&quot;center&quot;,&quot;verticalAlign&quot;:&quot;middle&quot;,&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontFamily&quot;:&quot;Poppins&quot;,&quot;color&quot;:&quot;#000000&quot;}},&quot;tooltip&quot;:{&quot;enabled&quot;:false,&quot;theme&quot;:&quot;light&quot;,&quot;shared&quot;:null,&quot;intersect&quot;:true},&quot;responsive&quot;:[{&quot;breakpoint&quot;:1024,&quot;options&quot;:{&quot;chart&quot;:{&quot;height&quot;:350},&quot;dataLabels&quot;:{&quot;enabled&quot;:false,&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontWeight&quot;:&quot;&quot;,&quot;colors&quot;:[null]},&quot;background&quot;:{&quot;enabled&quot;:false,&quot;borderRadius&quot;:0,&quot;foreColor&quot;:&quot;#ffffff&quot;,&quot;borderWidth&quot;:1,&quot;borderColor&quot;:&quot;#ffffff&quot;}},&quot;yaxis&quot;:{&quot;labels&quot;:{&quot;show&quot;:true,&quot;style&quot;:{&quot;colors&quot;:&quot;#000000&quot;,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontWeight&quot;:&quot;&quot;}}},&quot;xaxis&quot;:{&quot;labels&quot;:{&quot;style&quot;:{&quot;colors&quot;:&quot;#000000&quot;,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontWeight&quot;:&quot;&quot;}}},&quot;legend&quot;:{&quot;showForSingleSeries&quot;:true,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontWeight&quot;:&quot;&quot;,&quot;position&quot;:&quot;bottom&quot;,&quot;horizontalAlign&quot;:&quot;center&quot;,&quot;labels&quot;:{&quot;colors&quot;:&quot;#000000&quot;}}}},{&quot;breakpoint&quot;:767,&quot;options&quot;:{&quot;chart&quot;:{&quot;height&quot;:350},&quot;dataLabels&quot;:{&quot;enabled&quot;:false,&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontWeight&quot;:&quot;&quot;,&quot;colors&quot;:[null]},&quot;background&quot;:{&quot;enabled&quot;:false,&quot;borderRadius&quot;:0,&quot;foreColor&quot;:&quot;#ffffff&quot;,&quot;borderWidth&quot;:1,&quot;borderColor&quot;:&quot;#ffffff&quot;}},&quot;yaxis&quot;:{&quot;labels&quot;:{&quot;show&quot;:true,&quot;style&quot;:{&quot;colors&quot;:&quot;#000000&quot;,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontWeight&quot;:&quot;&quot;}}},&quot;xaxis&quot;:{&quot;labels&quot;:{&quot;style&quot;:{&quot;colors&quot;:&quot;#000000&quot;,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontWeight&quot;:&quot;&quot;}}},&quot;legend&quot;:{&quot;showForSingleSeries&quot;:true,&quot;fontSize&quot;:&quot;12px&quot;,&quot;fontWeight&quot;:&quot;&quot;,&quot;position&quot;:&quot;bottom&quot;,&quot;horizontalAlign&quot;:&quot;center&quot;,&quot;labels&quot;:{&quot;colors&quot;:&quot;#000000&quot;}}}}],&quot;stroke&quot;:{&quot;curve&quot;:&quot;straight&quot;,&quot;width&quot;:[5,5],&quot;dashArray&quot;:[0,0]},&quot;fill&quot;:{&quot;type&quot;:&quot;classic&quot;,&quot;opacity&quot;:1,&quot;colors&quot;:[&quot;#3499FF&quot;,&quot;#EF7D00&quot;],&quot;gradient&quot;:{&quot;gradientToColors&quot;:[&quot;#3499FF&quot;,&quot;#EF7D00&quot;],&quot;type&quot;:null,&quot;inverseColors&quot;:false,&quot;opacityFrom&quot;:null,&quot;opacityTo&quot;:null}},&quot;markers&quot;:{&quot;size&quot;:[0,0],&quot;strokeColors&quot;:[&quot;#fff&quot;,&quot;#fff&quot;],&quot;strokeWidth&quot;:[5,5],&quot;shape&quot;:[&quot;circle&quot;,&quot;circle&quot;],&quot;showNullDataPoints&quot;:true,&quot;hover&quot;:{&quot;size&quot;:3,&quot;sizeOffset&quot;:1}},&quot;grid&quot;:{&quot;borderColor&quot;:&quot;#90A4AE&quot;,&quot;yaxis&quot;:{&quot;lines&quot;:{&quot;show&quot;:true}}}}\"\n        data-responsive_options=\"[{&quot;breakpoint&quot;:1024,&quot;options&quot;:{&quot;chart&quot;:{&quot;height&quot;:350},&quot;xaxis&quot;:{&quot;title&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}},&quot;labels&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}}},&quot;yaxis&quot;:{&quot;title&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}},&quot;labels&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}}},&quot;legend&quot;:{&quot;fontSize&quot;:&quot;12px&quot;,&quot;position&quot;:&quot;bottom&quot;,&quot;horizontalAlign&quot;:&quot;center&quot;},&quot;dataLabels&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}}}},{&quot;breakpoint&quot;:674,&quot;options&quot;:{&quot;chart&quot;:{&quot;height&quot;:350},&quot;xaxis&quot;:{&quot;title&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}},&quot;labels&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}}},&quot;yaxis&quot;:{&quot;title&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}},&quot;labels&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}}},&quot;legend&quot;:{&quot;fontSize&quot;:&quot;12px&quot;,&quot;position&quot;:&quot;bottom&quot;,&quot;horizontalAlign&quot;:&quot;center&quot;},&quot;dataLabels&quot;:{&quot;style&quot;:{&quot;fontSize&quot;:&quot;12px&quot;}}}}]\"\n        data-extra_data=\"{&quot;no_data_text&quot;:&quot;No Data Available&quot;,&quot;legend_show_series_value&quot;:false,&quot;xaxis_label_prefix_show&quot;:false,&quot;xaxis_label_prefix&quot;:&quot;&quot;,&quot;xaxis_label_postfix&quot;:&quot;&quot;,&quot;xaxis_show_time&quot;:false,&quot;xaxis_show_date&quot;:false,&quot;yaxis_label_prefix_show&quot;:true,&quot;yaxis_label_format&quot;:true,&quot;yaxis_label_prefix&quot;:&quot;&quot;,&quot;yaxis_label_postfix&quot;:&quot; ms&quot;,&quot;decimal_in_float&quot;:0,&quot;chart_datalabel_decimals_in_float&quot;:0,&quot;chart_number_format_commas&quot;:true,&quot;chart_yaxis_label_pointer&quot;:false,&quot;chart_yaxis_label_pointer_number&quot;:0,&quot;chart_opposite_yaxis_title_enable&quot;:false,&quot;chart_opposite_yaxis_format_number&quot;:false,&quot;chart_opposite_yaxis_label_show&quot;:false,&quot;chart_opposite_yaxis_label_prefix&quot;:&quot;&quot;,&quot;chart_opposite_yaxis_label_postfix&quot;:&quot;&quot;,&quot;chart_datalabel_prefix&quot;:&quot;&quot;,&quot;chart_tooltip_prefix_val&quot;:&quot;&quot;,&quot;chart_datalabel_postfix&quot;:&quot;&quot;,&quot;chart_tooltip_postfix_val&quot;:&quot;&quot;,&quot;chart_data_option&quot;:false,&quot;dynamic_type&quot;:&quot;manual&quot;,&quot;chart_dynamic_data_option&quot;:&quot;&quot;,&quot;chart_data_series_count_dynamic&quot;:2,&quot;chart_csv_column_wise_enable&quot;:false,&quot;chart_csv_x_columns&quot;:&quot;&quot;,&quot;chart_csv_y_columns&quot;:&quot;&quot;,&quot;chart_csv_x_columns_sql&quot;:&quot;&quot;,&quot;chart_csv_y_columns_sql&quot;:&quot;&quot;,&quot;can_chart_reload_ajax&quot;:false,&quot;interval_data_refresh&quot;:15,&quot;is_chart_horizontal&quot;:false,&quot;current_post_id&quot;:12315,&quot;graphina_prefix&quot;:&quot;iq_&quot;}\"\n        data-settings=\"[]\"\n        style=\"height: 350px;\"\n    >\n    <\/div>\n<\/div>\n<script>\n    (function($) {\n        'use strict';\n        $(document).ready(function() {\n            if (window.graphinaLineChart && typeof window.graphinaLineChart.observeChartElement === 'function') {\n                window.graphinaLineChart.observeChartElement($('.graphina-elementor-chart[data-element_id=\"78a6ed0\"]'), 'line');\n            }\n        });\n    })(jQuery);\n<\/script>\t<div class=\"graphina-filter-notext graphina-78a6ed0-notext\" style=\"display: none; height:350px; align-content:center\">\n\t\t<p class=\"graphina-filter-notext\" style=\"text-align: center;\">\n\t\t\tNo Data Found\t\t<\/p>\n\t<\/div>\n\n<\/div>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-397137e elementor-widget elementor-widget-heading\" data-id=\"397137e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Conclusion<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-01f839a e-flex e-con-boxed wpr-particle-no wpr-jarallax-no wpr-parallax-no wpr-sticky-section-no wpr-equal-height-no e-con e-parent\" data-id=\"01f839a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-54e415b elementor-widget elementor-widget-text-editor\" data-id=\"54e415b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>A good strategy might be to start implementing and prototyping an application with PySide6 and move performance-critical code to C++ later. In my opinion it&#8217;s a beautiful thing to be able to write software in a productive language like Python and nonetheless have the confidence of being able to replace underperforming parts with equivalents written in a language like C++.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>In a recent series of blog posts, we have demonstrated that Python and Qt fit together very well. Due to its accessibility, ease-of-use and third-party ecosystem, it is really straightforward to prototype and productize applications. Still, Python has one significant disadvantage: It is not necessarily the most performant programming language.<\/p>","protected":false},"author":16,"featured_media":4011,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[1,2,846,8],"tags":[15],"class_list":["post-12315","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-allgemein","category-blog","category-python","category-qt","tag-qt"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/posts\/12315","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/users\/16"}],"replies":[{"embeddable":true,"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/comments?post=12315"}],"version-history":[{"count":38,"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/posts\/12315\/revisions"}],"predecessor-version":[{"id":12372,"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/posts\/12315\/revisions\/12372"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/media\/4011"}],"wp:attachment":[{"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/media?parent=12315"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/categories?post=12315"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.basyskom.de\/en\/wp-json\/wp\/v2\/tags?post=12315"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}