PDA

View Full Version : QTableView item's Highlight in QCombox



litterflybug
26th August 2009, 11:45
Hello everyone!
I ran into a problem, please help me.

first i set currentindex (combox->setCurrentIndex(3);)
then i popup tableview ,the tableview's current index is corrected,and show Highlight,
but when mouse move into tableview, the Highlight is change with mouse move,
how can disable auto change Highlight ,and limited change Highlight only when mouse click?

litterflybug
26th August 2009, 15:06
i tried tableView->viewport()->setMouseTracking(false);
this is worked

but someone will notice that combox->setView(tableView);
will call itemview->setMouseTracking(true);

so usage:
combox->setView(tableView);
tableView->viewport()->setMouseTracking(false);

thank