I am working on Qt application. There I have QTableView which takes its data from QAbstractTableModel. I am using QList to represent each row in the table. My question is, I would like to start showing scroll instead of keep growing table view size when I have more than 5 entries. How can I do that?
Thanks in advance
Does setting the Scrollbar Policy solve the problem?
tableView->setVerticalScrollBarPolicy(Qt::ScrollBarAsNeeded);
Related
I have a kendo grid in my application.
There are situations when I need to remove the Resource Naam column and then I get this.
But I want the grid to take the whole of the screen. How can I solve it??
Solved it. Without fixed width in the columns, it will resize properly.
My app has a UITableView and the table has near 5 Thousand rows (the app basically displays history in the form of vertical timeline), it's very tedious to scroll from top to bottom or vice versa, Any suggestions how can i make the scrolling better (faster), i don't wanna inculde section indexes to the right of the screen. Regards.
Have you implemented a search field? This could be used by users to find a specific entry, or range of entries. Then, when they scroll, they are only looking at a filtered list.
Also, try and categorise the rows, to create more of a hierarchical navigation, and reduce the number of rows per screen.
One of the way to make scrolling efficient is 'reusing' UITableViewCell
I'm building a grid using UIViewTable and adding 4 items for each cel.
However, when I rotate to portrait, I need to reduce the number of items from 4 to 3. And therefore I recompute the rowsArray and I display again the table.
Is this the correct way to proceed ?
thanks
I advice you to use AQGridView
https://github.com/AlanQuatermain/AQGridView
It's an open source grid implementation that is simple and that have many samples.
otherwise, if you add items like described, you will have to redraw all cells content every time the orientation change
I have some 10 rows in my table. I can able to scroll the table view, but the scroll is not fixed. when i leave the scroll the table is again hiding the last row. Can any one help me out in this issue.
Thanks in advance
You need to adjust the size of table view and also set the autosizing in inspector from IB.
It is hard to give an opinion without any code, but have you checked that your Table is not larger that the size of the view? Maybe the bottom of your Table is just displayed outside the window.
If not, you shall post the code of your controller methods to get some more accurate help.
Are you using interface builder or everything is defined in the code?
I'm making a navigation based application. When the user selects a row on the table view, it goes to the next table. However, depending on how many entries are on the table view, this can be instantaneous, or it can take a while.
Something needs to be shown to the user that the program is working and is not frozen. I was thinking of bringing up a different view with a progress bar on it, but that won't be useful for situations when the next table will load immediately.
I was also thinking of overlaying some kind of progress meter on top of the first table, but instead of a bar it's a circle. Is that possible?
What's the best way to handle this?
Take a look at this example http://github.com/matej/MBProgressHUD. Hope it helps.