Q3Table text alignment problem
Is there any way to set the text alignment of a Q3Table apart from using setItem?
The problem is that there is a clearCell() function called in setItem() which affect the performance a lot. (It's much slower........)
I tried to use setText() to solve the performance but the alignment is wrong.........
Can anyone help me? Thanks!
Re: Q3Table text alignment problem
You can sublass Q3TableItem and add a method for setting the alignment.
Re: Q3Table text alignment problem
Yes, I know that.
The problem is that how can I set the Q3TableItem to the Q3Table.
Is setItem(int, int, Q3TableItem *) the only way?
I found that the performance of this method is very slow in QT4 ......
What can I do to improve the performance??
Furthermore Q3Table problem
Furthermore, if I want to switch the QT3 Q3Table code to QT4 QTableWidget, what changes should I make to the following methods?
Code:
setResizePolicy( Q3Table::Default );
setReadOnly( TRUE );
setTopMargin(31);
setLeftMargin(-1);
setFocusStyle( Q3Table::FollowStyle );
updateCell( 1, 0 );
Re: Q3Table text alignment problem
Quote:
Originally Posted by
batileon
The problem is that how can I set the Q3TableItem to the Q3Table.
Once you set the item, you don't have to invoke setItem() again. You can alter the item through its methods.
Quote:
Originally Posted by
batileon
Furthermore, if I want to switch the QT3 Q3Table code to QT4 QTableWidget, what changes should I make to the following methods?
If you have problems with performance, maybe you should consider using QTableView and a custom model?
Also see QHeaderView.