PyQt : Read Data From QTableWidget And Insert Into Database

preview_player
Показать описание
Files :

Links :
PyQt5 : How To Link Ui file Into Python Code

PyQt : Show Data Into QTableWidget From Database.

Download Links :
Рекомендации по теме
Комментарии
Автор

Man, I'm a noob on this hehe. Can you tell me what's in line 29? (queryStr) because it gives me an error "sqlite3.OperationalError: incomplete input" :'3

chambasv
Автор

Hi,
How to append the qtable widget data as a numpy array?
I have to give the input as numeric values then do some calculation like below.

rowCount =
columnCount =
if (rowCount==columnCount):
size=rowCount
print("The size of the matrxi is %d * %d "%(size, size))
print("The Given matrxi is", "SUM of Row" )
for row in range(size):
rowData =[]
for column in range (size):
widegetItem = self.tableWidgetInput.item(row, column)
if(widegetItem and widegetItem.text):

else:
rowData.append('NULL')

inputArray = np.array(rowData, dtype=np.float64) ###convert the list into numpy array.
print(inputArray)
sumofCol = np.sum(inputArray, axis = 0, dtype='float') ###find the sum of Column
sumofRow = np.sum(inputArray, axis = 0, dtype='float') ### find the sum of Row

suganthiganesh
Автор

How to update data by clicking the values in the qtableview

akhilbabu
Автор

Hi! great video/tutorial! could you please reupload the files? the files are no longer available, thx!

KurtKeunen
Автор

how can i read that cell like label.text()

Life-zxwp
Автор

i can make Database with Qlistwidget ?

mitochondria
Автор

Hi,
Thank you so much for the great tutorial. I can't find where i am doing mistakes? Can you Please help . I Was trying to store 4*4 array values into db
The size of the matrxi is 4 * 4
['NULL', 'NULL', 'NULL', 'NULL']
Traceback (most recent call last):
File "DEMATMM.py", line 75, in submit

File "DEMATMM.py", line 32, in insertRowintoDB
queryStr.execute(queryStr, rowData)
AttributeError: 'str' object has no attribute 'execute'

suganthiganesh
Автор

Thank you very much sir. This method is by far the simplest solution I've seen all day and saved me from committing several unnecessary functions into my application. Many thanks.

le_travie