Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to create/connect sqlite3 database, insert data, update data and view all data within the Below PyQT5 GUI class.
Qt 6.11 is out! See what's new in the release blog

How to create/connect sqlite3 database, insert data, update data and view all data within the Below PyQT5 GUI class.

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 2 Posters 372 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.
  • L Offline
    L Offline
    LT-K101
    wrote on last edited by LT-K101
    #1
    class MainApp(QMainWindow, ui):
           def __init__(self, parent=None):
                  QMainWindow.__init__(self)
                  super(MainApp,self).__init__(parent)
                  self.setupUi(self)
    
    
    
    def main():
           app = QApplication(sys.argv)
           window = MainApp()
           window.show()
           app.exec_()
    
    
    if __name__ == '__main__':
          main()
    
    SGaistS 1 Reply Last reply
    0
    • L LT-K101
      class MainApp(QMainWindow, ui):
             def __init__(self, parent=None):
                    QMainWindow.__init__(self)
                    super(MainApp,self).__init__(parent)
                    self.setupUi(self)
      
      
      
      def main():
             app = QApplication(sys.argv)
             window = MainApp()
             window.show()
             app.exec_()
      
      
      if __name__ == '__main__':
            main()
      
      SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Use the Qt SQL module.

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

      L 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        Use the Qt SQL module.

        L Offline
        L Offline
        LT-K101
        wrote on last edited by
        #3

        @SGaist Thanks for replying. Could you please assist me add the syntax for the connection of qtsql within the PyQT5 GUI class above. Thank you again.

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

          Did you read the module documentation ?

          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
          1

          • Login

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