[Qt-interest] C++ or QML

Carsten Breuer CarstenBreuerQt at textwork.de
Wed Jun 30 20:22:28 CEST 2010


Hi brm,
hi all,

>> If the customer want a grid that behaves like microsoft excel,
>> it is pretty hard to solve this in QT. I had expected that this is
>> a common request to the QT developers, but emulation of different
>> navigation types are not implemented yet and are hard to do so.
> So you add a delegate to a QTableWidget, and then add the extra behavior you want.

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.

> Though honestly I wouldn't call an MS Excel grid a native type

Yes, right. I hate excel and i have thought for years that the
way user has to input data is not deterministic. QT does it pretty
right, but if the customer wants excel input scheme, it is very hard
to solve this with qt. Since this is a common request, i had expected
that QT would support this in a way.

So this would be perfect:

setNavigationType(int type);

with

Qt::NavigationOsDefault,
Qt::NavigationOpenOffice,
Qt::NavigationExcel,
Qt::NavigationVi,
Qt::NavigationEmacs,

>- it does require using the MS Excel Active X control at the very least,
>which you get as part of VisualStudios, but is not necessarily on the
>Windows platform unless someone else has put it there - either through
>installing Office or another App that pulled the ActiveX control along.

I don't want embed excel. I want to set QTableView in a mode that it
behaves like excel. Once again: It's not my idea ;-).


>> Even displaying floats with more then 2 decimal points
> float myValue = 3.1458;
> QString myQStringValue = QString("%1").arg(myValue,0,'f',4');
> QLabel* someLabel = new QLabel(myQStringValue); // or use setText() to update

That approach comes all the time and it really sucks!
It works only if the user don't edit the cell. Then you have
the same nightmare again.
If i have a model based on double values it makes no sense to
change that to QString. It shows only the limitations of the
model / view concept.

Don't understand me wrong. I love the idea of model / view,
but IMO that approach is not fully developed yet.

Best Regards,



Carsten




> 
> Ben
> 
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest




More information about the Qt-interest-old mailing list