Strange entering values in QTableWidget
Sorry for the strange task, but I need to enter values in the table in an unusual way.
I will fill in an NxM table where N is the quantity set in the QComboBox class and M is the quantity set using QScrollArea (that is, the quantity will be set when scrolling).
When the button is clicked, the values from these two classes should be taken and the table created. Can you tell me how to do this?
The method is complex, but I really want to implement it! Thanks
Are you trying to implant something similar to Word's insert table widget where you can drag the mouse to create an array of cells that will then become your table in the document ?
I think not
Just by clicking on the button, I will create an array of QTableWidget cells. These values (rows and columns) will be set from classes in QComboBox (rows) and QScrollArea (columns). But I don't know how to pass values from these classes to my QTabWidget class
When you click the button you can set the
setRowCount(xxx) and generate items to match.
However, im not sure what you want to read form the QScrollArea ?
I've almost solved my problem, but QScrollBar keeps bothering me (not QScrollArea, sorry). Is there any way to increase the value when scrolling the scroll bar, and then get that value?
There is the singleStep property but not sure it applies if you drag the scrollbar but try set it to bigger
Pl45m4 last edited by
I think even
QScrollBaris not the right choice.
If you want to do, what I think, you are probably looking for this: QSlider