Unsolved Dynamic handling for QTableWidget
-
@jsulm I am actually using one tablewidget for multiple tables. Therefore, I have not used the column/row header and added the same in form of items in the widget. I have created the tablewidget in the following way:
Screenshot for edit table, column tab:
Row tab:
Items tab:
In items tab there will be headings in the grey area. This enables me to add multiple table in single tablewidget.
So, the issue arrives when I need to add something in the middle. As you said that, we can add/remove rows/columns. But, currently I cannot do that.
Does that mean I have to redesign the whole tablewidget? Use column and rows tab and then do the editing like I did. Is that correct. Is there any way I can do the same without redesigning? (just add columns/rows and copy paste all the items in one go)
-
@Piyush If you need to add a row in the middle then first add it via + button, then select it and move it to the place where you want to have it using the up button (arrow shoing up). Is this working?
-
@jsulm That is not working. It adds the row on the top which cannot be moved/shifted down using the arrow keys
-
@Piyush
Hi
works fine here
-
@mrjj please have a look at my previous comment. I have explained the case in that.
-
Hi
If there is no rows and cols , there can be no items.
So im really not sure what you are asking. :) -
@mrjj Hi
If we do the following in QT Designer on a blank tablewidget, then we have blank items without any rows/columns appearing under rows/columns tab.
-
@Piyush
Ahh , in that way :)
yeah that is the same it seems,
except u cant move rows up and down as they are not there :)
Hmm, yes i see your point. its then not possible to add row in the middle since rows before and after
do not really exists for it. -
@Piyush What if you don't set fix number of rows and columns? Just add everything in this item editor.
-