How it works…
You can see in the script that the click() event of the push button with the objectName property pushButtonCreateTable is connected to the createTable() method. This means that, whenever this push button is clicked, the createTable() method will be invoked. Similarly, the click() event of the push button with the objectName property pushButtonAddColumn is connected to the addColumns() method. That is, this button, when clicked, will invoke the addColumns() method.
In the addColumns() method, the CREATE TABLE SQL statement is defined, which consists of the column name entered in the Line Edit widget and the data type selected from the combo box. The user can add any number of columns to the table.
In the createTable() method, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access