Results 1 to 3 of 3

Thread: How to connect QLineEdit to add to SQLite db? PyQt

  1. #1
    Join Date
    Jun 2013
    Posts
    2
    Qt products
    Platforms
    Unix/X11

    Default How to connect QLineEdit to add to SQLite db? PyQt

    I am new to both python and pyqt. I am not sure if there is a way to have the QLineEdit submit directly to the db when a pushbutton is selected and if so is it possible to get an example. I can provide a demo code I have if that would provide any help? Any help is appreciated.

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: How to connect QLineEdit to add to SQLite db? PyQt

    I don't know much about PyQt, but if you know how to connect a signal to a slot this should be a simple and straight forward thing to do, just connect the clicked signal of pushbutton to submit slot of the db or other custom slot to call submit
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

  3. #3
    Join Date
    Jun 2013
    Posts
    2
    Qt products
    Platforms
    Unix/X11

    Default Re: How to connect QLineEdit to add to SQLite db? PyQt

    Thanks for the reply I think I might have figured it out. I won't be able to test it out until later. I have been reading several documents and I have been confused with the QDataWidgetMapper. I think that is my key to connect everything. If I cannot get it I will post more of the code I have and what I have tried.

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2012, 15:41
  2. Replies: 0
    Last Post: 27th October 2011, 10:23
  3. PyQT connect problem
    By di_zou in forum Newbie
    Replies: 1
    Last Post: 6th November 2009, 17:03
  4. How to connect Qt to SQlite
    By visualo in forum Qt Programming
    Replies: 1
    Last Post: 21st October 2009, 22:24
  5. Replies: 5
    Last Post: 6th September 2009, 16:32

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.