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. Integrating Python with QT
Forum Updated to NodeBB v4.3 + New Features

Integrating Python with QT

Scheduled Pinned Locked Moved Unsolved Language Bindings
5 Posts 4 Posters 2.2k Views 4 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    Hi All
    Can some one guide me with example Python can be integrated in QT and how we can show the same

    1 Reply Last reply
    0
    • jeremy_kJ Offline
      jeremy_kJ Offline
      jeremy_k
      wrote on last edited by
      #2

      Have you seen PyQt or PySide?

      The Language Bindings category is a better place for this topic.

      Asking a question about code? http://eel.is/iso-c++/testcase/

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

        Moved.

        Hi,

        What do you mean by integrate python with Qt ?

        Run a python script through the C++ runtime or as @jeremy_k suggests, use Qt to build a python 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
        • Q Offline
          Q Offline
          Qt Enthusiast
          wrote on last edited by
          #4

          Any example will be helpful

          mrjjM 1 Reply Last reply
          0
          • Q Qt Enthusiast

            Any example will be helpful

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Qt-Enthusiast

            PyQt example

            #! /usr/bin/env python
            # -*- coding: utf-8 -*-
            #
            # Here we provide the necessary imports.
            # The basic GUI widgets are located in QtGui module. 
            import sys
            from PyQt4.QtGui import QApplication, QWidget
            
            # Every PyQt4 application must create an application object.
            # The application object is located in the QtGui module.
            a = QApplication(sys.argv)
            
            # The QWidget widget is the base class of all user interface objects in PyQt4.
            # We provide the default constructor for QWidget. The default constructor has no parent.
            # A widget with no parent is called a window. 
            w = QWidget()
            
            w.resize(320, 240)  # The resize() method resizes the widget.
            w.setWindowTitle("Hello, World!")  # Here we set the title for our window.
            w.show()  # The show() method displays the widget on the screen.
            
            sys.exit(a.exec_())  # Finally, we enter the mainloop of the application.
            
            1 Reply Last reply
            1

            • Login

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