You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Friday, April 5th 2013, 7:08am

QTableView with own delegates. Editing starts too slow after clicking in cell

Hello,
i have a Table inherited from QTableView:

Source code

1
2
3
4
    m_tableView = new TableView();
    m_tableView->setEditTriggers(QAbstractItemView::SelectedClicked);
    m_tableView->setSelectionMode(QAbstractItemView::SingleSelection);
    m_tableView->setSelectionBehavior(QAbstractItemView::SelectRows);


And then set a delegate:

Source code

1
2
    LineEditDelegate *myLineEditDelegate = new LineEditDelegate("[a-zA-Z0-9]{1,8}");
    m_tableView->setItemDelegateForColumn(0, myLineEditDelegate);


It works BUT it takes a long time to switch in edit mode after clicking in a cell.
I would excpect after a click or double to be directly in edit mode.
In my case i click in a cell and then it takes about 0,75 seconds until line edit (delegate) appears and i am in edit mode...

Any ideas why it takes so long after clicking into a cell to switch in edit mode?

Greetings
Nando