Qt, creating very custom table - c++

Hello! I wonder if there is a way of making such kind of table with combined cells using Qt.
Any advices?

You can use QGridLayout, add QFrames and set the rowSpan and columnSpan of each item to group cells.
You will have to come up with your own controller, though, for applying data to the cells.

As RobbieE said in comments QTableView::setSpan() function does this job very well!

Related

How to hide one cell in the ASCIIDOC table?

I have a table with human parameters. I want to hide one column, for example age, if attribute :showall: is not set. How to do that? I can hide only the whole table, but not the one column.
.Human parameters
:showall:
ifdef::showall[]
[cols="1,1,1,1,1"]
|===
|Name
|Sex
|Age
|Country
|Weight
5+^|Values
|John Daw
|Male
|41
|Algeria
|85
endif::showall[]
That's not a built in feature.
You have two options:
For cell content that should be hidden, simply remove it from the table.
If you need show/hide functionality, you'll need to add some custom JavaScript and CSS to make that happen.
For option 2, the technique for including JS/CSS is called Docinfo files.
You'll have to experiment with column show/hide, as there may be browser compatibility or presentation issues that would need to be addressed. That said, this answer might show a technique that would work for you: https://stackoverflow.com/a/34098320/4023764

Django-tables2 RowSpan

I tried to make a table with rowspan when the cells in the same column have the same value.
Like in this image
And i want to make it with django-tables2
I tried this code line but it shift the X1 to the field2 column at the second record.
Thanks in advance.
There is no support for rowspan in django-tables2. While adding such a feature is a theoretical possibility, I suspect it is non-trivial and will bring quite some complexity.
You are welcome to propose a patch by opening a pull request though, but I will only consider merging it after I can inspect the actual implementation (and documentation, tests).

Selectable cells in UITableView with ProMotion

I’m getting crazy with Pro Motion table and I cannot find any discussion about this online.
I’m using a PM::TableScreen and I need to have selectable table rows. I manage the raw selection in an array but I don’t know how can I get the cell object to call cell.accessoryType = UITableViewCellAccessoryCheckmark if is selected or cell.accessoryType = UITableViewCellAccessoryNone if not selected.
Here is the gist of my screen: I try to intercept the cell passing a value in the arguments (row) but I cannot find a method to get the cell object.
In my original idea the place for the selection is inside my tapped_cell method byt maybe there is a better way to manage a multiselection.
My Gist
You don't want to memoize the table data. I've created a pull request with the fix:
https://github.com/robypez/rm_quiz/pull/1
Hard to summarize here, although I know Stackoverflow doesn't like us relying on links.

Add a "lookup" column in a Kendo Grid

I have a Kendo Grid which represents a many-to-many join table (between Parts and Templates). I want to look up the PartID with a combo box that lists parts by PartNumber instead of by PartID.
A rough image of what I want to acheive.
The question is not clarified. Basically how to deal with foreign key columns is covered in this demo. Also this one is pretty similar.

Table cell stretching

I have two columns in my table with equal width (50%, 50%).
I am showing search results URL in them. For big urls the columns are stretching and destroying the layout.
Any suggestion to the problem?
SEE How to wrap long lines without spaces in HTML?
These may help too:
Best word wrap algorithm?
Word-wrap in an HTML table
You can set text-overflow:ellipsis; described here and/or use jQuery ellipsis plugin.