Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Qt 5 & Python integration
Forum Updated to NodeBB v4.3 + New Features

Qt 5 & Python integration

Scheduled Pinned Locked Moved Language Bindings
8 Posts 3 Posters 21.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JrVt
    wrote on last edited by
    #1

    Hello,

    I have a general question.

    I have a couple of Python scripts (use python 2.6) based on Numpy, Scipy, PyLab, PyUsb, PySide, ...

    The goal is to integrated the python into Qt 5.0, build a nice GUI, write some extra C++ around it, compile to an exe so it can run as a stand-alone program for windows 7.

    Finally, the user may not get access to the python code or any other code written in Qt or C++.

    My question is this possible.
    If yes, can you give nice starting points, examples, that explains how I can start and to do this integration.

    Regards,
    JrV

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to DevNet,

      You can search for "PyQt":http://www.riverbankcomputing.com/software/pyqt/intro & "PySide":http://qt-project.org/wiki/PySide. Those are bindings for Qt in python.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • J Offline
        J Offline
        JrVt
        wrote on last edited by
        #3

        Hello,

        I understand that PyQt and PySide is to use Qt in Python. Correct?
        This is what the scripts are doing at the moment.

        The goal is to use Python in Qt5.

        JrV

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          So, you want to embed a python interpreter in a Qt application ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • J Offline
            J Offline
            JrVt
            wrote on last edited by
            #5

            Correct.

            I like to embed the Python code into a Qt application written in Qt5.0.1.

            So I can compile it to a stand alone application for windows 7

            JrV

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              If it's only a matter of making a standalone application, it can also be done for python application using i.e "PyInstaller":http://www.pyinstaller.org/

              If you already have a complete application in python, no need to rewrite it in C++.

              Otherwise look for something like PythonQt, but IIRC it currently supports only Qt 4.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • J Offline
                J Offline
                JrVt
                wrote on last edited by
                #7

                Ok. So using PyInstaller I can make a exe file.
                Question. What about reverse engineering.
                Can somebody for example recover the Python code.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mid-kid
                  wrote on last edited by
                  #8

                  Maybe "this":http://stackoverflow.com/questions/261638/how-do-i-protect-python-code will help you

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved