TableView Scrolling on Button Click Qml - qt

Is there any property by which i can scroll up and down on button clicked in tableview. I don't want vertical scroll bar visible but i want to make it scroll on button clicks ?
I don't want to increment currentrow value, i want to make currentrow value fix,
I just want to scroll tableview list on button click.

You can use flick method to scroll TableView. For scrolling down:
myTableView.flick(0, -1000)
and for scrolling up:
myTableView.flick(0, 1000)
Here 1000 is the velocity in y direction. You can change it to your desired value.

Related

JavaFX ScrollPane not showing ScrollBars until mouse is clicked on the ScrollBar

I've got a ScrollPane containing a TableView. The ScrollBars are hidden until you click the mouse on them. Since they are invisible you have to guess where to click to make them appear. It doesn't matter if the TableView has data in it or just the column headers. It doesn't matter if the ScrollBar policy is ALWAYS.
The vertical ScrollBar displays if you have a scroll mouse and scroll it, but you have to guess where horizontal ScrollBar is and click the mouse on it to make it appear.
How can I make the ScrollBars stay visible in a ScrollPane?

Scrolling QTableWidget smoothly

I have a QTableWidget with custom Widgets. These widgets are big and fill almost the whole scroll area in height, so that only one row is visible.
I can scroll with the mouse wheel or by dragging the scroll bar, but the row always jumps.
Is there a way to configure the QTableWidget to smoothly scroll, without jumping?
Try to use this:
view->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel)
From Qt documentation:
enum ScrollMode { ScrollPerItem, ScrollPerPixel }
verticalScrollMode : ScrollMode
This property holds how the view scrolls its contents in the vertical
direction.
This property controls how the view scroll its contents vertically.
Scrolling can be done either per pixel or per item.

Touch event for right and left bar button items of navigationbar in ios7

I created left bar button item and array of 2 bar button items to the right bar button item. Here, the problem is, if I tap on area out of the left and right bar button items, the navigation occurs.How to remove this touch behaviour at the area out of the buttons?
I created left and right bar button items as shown in figure.Kindly answer my question.
Have you tried disabling the back button with the hidesBackButton property on the navigation item?
self.navigationItem.hidesBackButton = YES;
See the UINavigationItem docs.

Flex - setting data provider and row count on a datagrid causes rows to be hovered over from outside the grid

I have a UIComponent that has a subclass of datagrid at the top and a button "removeValues" at the bottom.
When the removeValues button is clicked, I call resetDataProviderin the datagrid, which sets the dataprovider to about half the number of values that were previously in the data provider and resizes the datagrid to x number of rows when value is less than/equal to 6.
I've noticed a weird issue when I hover over the bottom of the component after it's been resized. One of the rows remaining in the grid is highlighted (as if I've hovered over it) when I hover over the bottom of the UIComponent (which looks like empty space).
I listen for a mouseOver event on the datagrid and sure enough, it thinks it's hovering over one of my item renderers for a datagrid row.
I've tried invalidateList(), validateNow(), invalidateDisplayList(), but nothing seems to update it properly. Has anyone got any ideas on what I could try?
public function resetDataProvider(value:XMLList):void
{
dataProvider = value;
if(value.length() <= DEFAULT_ROW_COUNT)
{
this.rowCount = value.length();
height = measureHeightOfItems(-1, rowCount+1) + viewMetrics.top + viewMetrics.bottom;
}
invalidateList();
validateNow()
}
Edit:
Just an update on this: the issue goes away when I scroll down the grid (more than 6 rows) and scroll back up. Is there a way to mimic the update it's doing programmatically?

Display buttons on hover in NSWindow

How can I get the buttons (close, minimize, maximize) to hide when the cursor isn't over the window and show themselves when the cursor is.
Basically, I want to duplicate the behavior that Quicktime has.
If you subclass NSWindow you can do it with your own buttons and tracking area.

Resources