Context menu works slowly on QTableWidget
Hi everyone
I have a problem with context menu on QTableWidget. It works pretty slow. My QTableWidget's cells are painted with delegates nad I wonder if this could cause such behavior... Here is some code
Code:
{
context.addAction("&Open Containing Folder...");
context.addSeparator();
context.addAction("&Download");
context.addAction("&Stop");
context.exec(pe->globalPos());
}
Re: Context menu works slowly on QTableWidget
QTableWidget's cells are always painted with delegates. I suggest using a profiler to find a bottle neck. There is a good chance it's in the delegate. Convenience classes such as QTableWidget are slower than their model oriented counterparts, so if you have many items this is a possible reason of the slowdown as well.
Re: Context menu works slowly on QTableWidget
Quote:
Originally Posted by
wysota
QTableWidget's cells are always painted with delegates
What about index Widgets ? :o
Quote:
Originally Posted by
wysota
I suggest using a profiler to find a bottle neck
What's that ?
Re: Context menu works slowly on QTableWidget
Quote:
Originally Posted by
THRESHE
What about index Widgets ? :o
They are separate widgets so essentially they don't count. Even then the delegate is used. Try setting a transparent index widget and you'll see for yourself.
http://en.wikipedia.org/wiki/Performance_analysis