[Qgis-developer] QTableWidget in custom ui feature form?!
matthias.kuhn at gmx.ch
Sat Jul 26 08:30:43 PDT 2014
On 26.07.2014 14:52, Thomas Kreuzer wrote:
> Hejhej Matthias,
> it is really just a "style" issue, currently I am using the grid layout.
> I just figured a QTableWidget looks nicer, but if it is too much
> effort I won't use it.
I see, then you probably don't want to use it :-)
> On 26.07.2014 12:28, Matthias Kuhn wrote:
>> The table cells themselves are not widgets.
> I thought this is only true for QTableView, while QTableWidget uses
> QTableWidgetItem, which is a subclass of QWidget.
I don't think QTableWidgetItem is a subclass of QWidget. It's just
easier to use when the table is just used in simple scenarios. And even
if it was a QWidget, it would need QGIS to support this particular
subclass of QWidget, which would need to be implemented first (but that
in turn could be done the way that is outlined in the blogpost linked in
the last email).
You should be able to implement such a table yourself along with a new
custom form element, and then promoting the table in QtDesigner. That
will require some work and knowledge.
> Maybe sometime in the future, QT Designer will support setting the
> cellWidgets in the ui form.
I wouldn't expect it. It's not QtDesigner, it's a
> In the mean time, thank you for your elaborate answer, I will play
> with different style, maybe I find something else which gives me a
> good feeling about the looks :D
I'm sure that's easier and better suited.
More information about the Qgis-developer