Appending Qtablewidget row contents to qLineEdits
-
aim accomplished. ALL THANKS to you. Honestly if you had directed me to QT documentation, I wouldn't have been able to understand it. I appreciate.
@CEO
Np. Glad you could make it work.If you ever need to make something like this again, You can get most of it for free/no code
if you use a standalone model as then you can also connect the LineEdits to the model with the table and it would auto sync. -
aim accomplished. ALL THANKS to you. Honestly if you had directed me to QT documentation, I wouldn't have been able to understand it. I appreciate.
@CEO alright. I am grateful.
I have been thinking of ways I can design the table lines. is it possible please? For now, I can only setStylesheet to the table background. Is there anyway I can thicken the table lines and maybe give it another color different from the table background?
-
@CEO alright. I am grateful.
I have been thinking of ways I can design the table lines. is it possible please? For now, I can only setStylesheet to the table background. Is there anyway I can thicken the table lines and maybe give it another color different from the table background?
@CEO
Well there is
https://doc.qt.io/qt-5/qtableview.html#gridStyle-prop
that allows you to set pen and color when drawing the grid.Its also avialable for TableWidget as it inherits qtableview
-
@CEO
Well there is
https://doc.qt.io/qt-5/qtableview.html#gridStyle-prop
that allows you to set pen and color when drawing the grid.Its also avialable for TableWidget as it inherits qtableview
-
@CEO
Well there is
https://doc.qt.io/qt-5/qtableview.html#gridStyle-prop
that allows you to set pen and color when drawing the grid.Its also avialable for TableWidget as it inherits qtableview
@mrjj I have studied the content. Honestly I hate reading QT documentations because they don't teach an individual how to use them. No illustrative example. Most things I know today, I learned from other links.
I have practicalized self.tab.setGrid() I don't know options to use. No much work on QT online and learning through the documentation is terrible. -
@CEO
Well there is
https://doc.qt.io/qt-5/qtableview.html#gridStyle-prop
that allows you to set pen and color when drawing the grid.Its also avialable for TableWidget as it inherits qtableview
@mrjj I found a better site to learn more about Qtablewidget. >>>>> https://topic.alibabacloud.com/a/use-of-qlistwidget-and-qtablewidget-and-style-settings_8_8_10259690.html
I hate Qt documentation site. They make it difficult for a beginner to understand
-
Hi
Ok super. Was afraid I didn't explain good enough.Well in my book the
for j in range(self.itemList.columnCount()):
should loop all coloums for the selected Row.Do notice that code won't do right if you select multiple rows but I assume that was not the plan.
You are very welcome. Disclaimer. I suck at python as such but programming is programming and
same tactics works regardless of language used-Whoops
Just saw
itemList[0].setText(text)
should be
itemList[j].setText(text)so we take next index when we take next col.
I assume j will go 0,1,2,3,4 etc ?
also when you take the text
itemcodd = self.tab.item(row, 0)
should that not be itemcodd = self.tab.item(row, j)
so we take cols one by one and not just 0 (zero)@mrjj hello Mr. JJ, I am having challenge retrieving data into a qTablewidget. I have been retrieving data into qtablewidget before.
I used qtable in storing the data into the database and one of the columns in the table used qcombobox. Is it that I will have to retrieve that data into a qcombobox too?
I am asking this because I'm not seeing any error in my retrieval code.