Software development challenges around setHorizontalHeaderLabels()
-
I extended my software development experiences also around the class “QSqlTableModel”. I hoped that database queries will help in some application areas (besides the ones which I know already).
But I have noticed then again that a program which I would like to adjust further contains a dependency on the function “QStandardItemModel::setHorizontalHeaderLabels”. Now I am curious if you would like to share advices for corresponding software design options. -
Hi,
These two types of models share a common ancestor, that's all. You're not really explaining what you are currently doing with that application's QStandardItemModel which could be related to QSqlTableModel. So what kind of advice are you looking for ?
-
These two types of models share a common ancestor, that's all.
It is usual that these classes were derived from a known base.
So what kind of advice are you looking for ?
It took another while to recognise where they are different in significant ways.
I hope that a software transformation will become possible for better cooperation between mentioned programming interfaces.
Can there be a mapping between these development approaches? -
@elfring said in Software development challenges around setHorizontalHeaderLabels():
These two types of models share a common ancestor, that's all.
It is usual that these classes were derived from a known base.
What I was stating is that QSqlTableModel was not inheriting from QStandardItemModel but both had a common base.
@elfring said in Software development challenges around setHorizontalHeaderLabels():
It took another while to recognise where they are different in significant ways.
I hope that a software transformation will become possible for better cooperation between mentioned programming interfaces.
Can there be a mapping between these development approaches?Why would there be ? If you want custom header data with the SQL models, you can either use a proxy model like QIdentityProxyModel, use a QSqlQueryModel with a properly crafted query or subclass QSqlTableModel to return the headers you want.
-
If you want custom header data with the SQL models, you can either use a proxy model …
I imagine that further functions can be added to both classes.
Where would you like to introduce the support for translations, internationalisation or localisations (for example)?
-
@elfring said in Software development challenges around setHorizontalHeaderLabels():
Where would you like to introduce the support for translations, internationalisation or localisations (for example)?
Is it really so hard to first take a look at the documentation of a project before permanently asking question answered already there?
http://doc.qt.io/qt-5/internationalization.html -
This information source can be fine in principle.
I am struggling with further software evolution around specific data models.
-
What further software evolution ?