I'm guessing you have a bug in your code. But since you haven't shown us any code, that's all it is, a guess. I could guess something else, but I think "a bug" is a good guess, so I'll stick with it.Why it isn't updated in the single table?
I'm guessing you have a bug in your code. But since you haven't shown us any code, that's all it is, a guess. I could guess something else, but I think "a bug" is a good guess, so I'll stick with it.Why it isn't updated in the single table?
<=== The Great Pumpkin says ===>
Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.
It's hard to provide small piece of code but I can first provide the whole project. Few helper conclusions:
- Scroll bar positions are remembered in rememberScrollBars();
- First two QTableWidgets (ui->tableWidget, ui->tableWidget_2) are being filled with insertLZCSDTableRow()
- The third (problematic) QTableWidget is being filled with insertLZSDETableRow() (so LZSDE, not LZCSD)
- The QProcess-triggered callbacks that provide data for the tables are: handle_zkiresize_list() for tableWidget&tableWidget_2, handle_zkiresize_consistent() for tableWidget_3
- Vertical scroll bar position is restored (comment "RESTORE SCROLL", 3 times in code) via e.g. ui->tableWidget_3->verticalScrollBar()->setValue(...)
- I now always call setMaximum() to a large value (two times the expected maximum) before calling setValue(), and this helps
Who knows, maybe someone would like to build this project. CMake can build everything, but there are also .pro files, and one could just fix libraries paths in it. I guess building own libgit2 might not be a great idea, but it's fixable by just changing library reference to an external one, in manager.pro file. To run the project one needs psprint/zkl github repository placed at ~/.zekyll/repos/gh---psprint---zkl---master, and backend "zekyll" (https://github.com/psprint/zekyll) placed at ~/.zekyll/zekyll
The source:
- remembering of scroll bars' positions: https://github.com/psprint/QtZekyllM....cpp#L697-L702
- rememberScrollBars() code https://github.com/psprint/QtZekyllM...pp#L1370-L1376
- filling of tableWidget_3 (the problematic one): https://github.com/psprint/QtZekyllM....cpp#L250-L261
- filling of tableWidget and tableWidget_2: https://github.com/psprint/QtZekyllM...indow.cpp#L155
- the setValue() call, which is problematic (maximum() == 0) when there is no preceding setMaximum() call: https://github.com/psprint/QtZekyllM...indow.cpp#L280
Overriding the maximum of a table view's scrollbar doesn't sound like a very good idea.
That value is usually determined by the table's data, i.e. how many rows it has an how high these rows are.
Cheers,
_
Bookmarks