[Qt-interest] C++ or QML

Carsten Breuer CarstenBreuerQt at textwork.de
Wed Jun 30 23:57:26 CEST 2010


Hi brm,
hi all,

>> It would be fine if it where that easy  :-(.
>> With a delegate you can only modify the style the item is painted if 
>> it is not edited. Since the delegate creates the editor, you now have to 
>> create a custom editor and so forth. It becomes a nightmare if you also need 
>> special hotkeys.
> Sub-class the QTableWidget and you can probably do more.

I have finished the project already and it works like it
has to be. The discussion here is more about how to improve
things and the missing parts.

>> setNavigationType(int type);
>> with
>> Qt::NavigationOsDefault,
> ...
> That's not exactly an easy set to deal with, and it's not Qt's business (IMHO) either.
> Vi and Emacs alone are highly programmable for movement.

Well, especially these two was not realy serious meant.
Sorry, if it doesn't become clear.

> And getting into that kind of thing would be a real hassle for the Qt guys.
> For example - differences between Excel 6, Excel 2003, Excel 2007, and Excel 2010; which are you going to follow?

That's doesn't matter since any of them will do the job.
A user would identify the navigation as "Excel" regardless
of the version. There are small differences, but that is
not the matter. Call the Navigation Excel2003...no problem.

> Is it really realistic to try to make the framework follow third
> party interface of which they have no control?

Absolutely, because the habits are known.
And remeber...its an option...not more.
It has to be activated by the developer and i
think most developers will agree here.
If they don't need the feature, they dont use
it. No difference.

> The only way to provide true Excel support is to use an embedded Excel spreadsheet.
> Anything else is unrealistic, IMHO.

I totally disagree. It's the job of a framework to make the life
easier and QT do this verry well. To embed excel in a cross
plattform application is worser then worse. And only for navigation?
No...this is very unrealistic, IMHO.

> I would guess two parts - delegates, subclassing (delegates and QTableView),
> and custom widgets for each cell.

I'm finished with that, it was a lot of work and
i have to subclass a lot.

> You probably want to look at QTableWidget::setItemProtocol() too

I use QTableView (model based).

> It's all a matter of the widgets, etc that you embed in the cells.
> I typically will embed QLabels into the cells to make data read-only. No delegate required.
> On the other hand, you can also use QValidators to enforce that certain data is the correct data.

Yes, but for editing the delegate creates an editor and so the
problem pops up again. I ends up with:

CustomQTableView
CustomItemDelegate
CustomDoubleSpinbox
CustomHeaderData
...



Best Regards,



Carsten



More information about the Qt-interest-old mailing list