Python Forum
PyQt5, QtSql: connection to database does not work
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PyQt5, QtSql: connection to database does not work
#4
QSqlDatabase.addDatabase(type, connection name)

you can give your connection a name, this is an option.

If connectionName is not specified, the new connection becomes the default connection

QSqlDatabase.setDatabaseName(filepath)
Reply


Messages In This Thread
RE: PyQt5, QtSql: connection to database does not work - by Axel_Erfurt - Jan-12-2023, 02:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  PyQt5 form not displaying my data from SQLite3 Database Linuxdesire 2 5,125 Jan-10-2023, 09:51 PM
Last Post: gradlon93
  [PyQt] [Solved]Make certain columns Un-editable in QtSql Extra 7 3,363 May-28-2022, 05:19 PM
Last Post: Extra
  Huge code problems (buttons(PyQt5),PyQt5 Threads, Windows etc) ZenWoR 0 2,946 Apr-06-2019, 11:15 PM
Last Post: ZenWoR
  [PyQt] How to print a QtSql.QSqlQuery() from python ThunderBlitz 0 5,049 Mar-22-2017, 01:07 PM
Last Post: ThunderBlitz

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020