I have a QDirModel attached to a QTreeView and I only want to see the paths, not size, type and date modified.
Is there a way to remove these columns?
QTreeView::setColumnHidden(int column, bool hide) should do the trick.
One can also use hideColumn(). Something like:
for i in range(1, self.my_tree_view.header().length()):
self.my_tree_view.hideColumn(i)
Related
When generating tables in SPSS with the calculation of the mode it will show a footnote when multiple modes are present ("a. Multiple modes exist. The smallest value is shown").
There is a way to hide this footnote, but the hidden footnote will still take up an empty row in the output. For processing reasons I would like to delete the footnote entirely.
I have been trying to do this with the Output Modify command in the syntax, but can't get it to work. There are commands for selecting the footnotes:
/TABLECELLS
SELECT = ["expression", COUNT, MEAN, MEDIAN, RESIDUAL,
PERCENT, SIGNIFICANCE, POSITION(integer),
BODY, HEADERS, FOOTNOTES, TITLE, CAPTION, …]
And for deleting objects:
/DELETEOBJECT DELETE={NO**}
{YES }
But trying to combine these does not yield the wanted result. Is what I am trying to do possible? Or maybe a suggestion for another solution?
Thanks in advance!
try adding "NOTESCAPTIONS = NO" at the end of your OUTPUT MODIFY syntax.
that should remove all notes and captions in the output.
no need to use "DELETEOBJECT" subcommand.
I have a requirement to filter out blank cells OR non-blank cells for a given column. I could imagine a custom header formatter function that would add a control in the header to do this, but I would need to write a lot of code for this, right? Both the headerFilter and the function would take significant custom coding. Am I over-thinking this problem? even if there is nothing built in to tabulator, is there an easy way to do it?
It is not clear from your question what you are looking to filter.
If you want to filter out rows if the value of a certain property is empty then you can use a filter function (in this case im using the age field):
table.setFilter(function(data){
return !!data.age;
});
On this page
https://en.wikipedia.org/wiki/Trinity_Seven#Episode_list
I have:
//*[text()='Reception']//preceding::th[contains(#id, 'ep')]//following::I
But it only registers following.
The default firepath selector is: .//*[#id='mw-content-text']/div/table[5]/tbody/tr/td[1]/I but this kind of selector is known to break quite frequently. Just wondering if there is a better way of doing this and I thought this might be a way.
Thanks!
:)
- You can see that it's getting stuff under the table which is not what I want :S
Try to use below XPath to match required elements:
//th[contains(#id, 'ep')]/following::I[./following::*[text()='Reception']]
This looks more simple
//tr[contains(#class, 'vevent')]//i
Don't overcomplicate things. You need I tag inside each row. So just find row locator tr[contains(#class, 'vevent')] and get it's I
Another good approach in case you want to check that inside of parent element is located some special element, but you want to find some 3rd element is to use such style: //element[./specific]//child , so in your case:
//tr[contains(#class, 'vevent')][./th[contains(#id,'ep')]]//i
so it's I tag inside row that contains #id,'ep' in header
Can anyone think if an elegant way to do update and replace in one line?
I want to use the r.row.without to remove fields and update at the same query.
Something like:
r.db('db').table('table').get('item_id')
.update({ field_a:'value_a'})
.replace(r.row.without(r.args(['field_b'])))`
simply chaining would be nice but this won't work (update returns a change result).
You can also write .update({field_a: 'value_a', field_b: r.literal()}) to change one field and remove another field at the same time.
r.db('db').table('table').get('item_id')
.replace(
r.row.merge(
function(doc){
return {field_a: 'newval'}
}
).without('field_b')
)
Should do the trick
How to use =SWITCH & IIF condition to change color in SSRS if the condition is met. I have two columns “ScheduledDate” (which is date/time), and Activity(which is text format). I want to change the color of Activity (which has the output as Complete, Current, Overdue), if the ScheduledDate is greater than today’s date, then I want to change the Overdue data in Column Activity to RED.
Should using Switch would be good or IIF. How? Can anyone please give an example?
Appreciate any help on this one.
Thanks,
Niki
In this scenario, if you only need set RED without setting multiple color for fields, it's better to use IIF(). Base on your condition, try the expression below:
=IIF(Fields!ScheduleDate.Value>Now() and Fields!Activity.Value="Overdue",Red,Black)
I think I figured it out. It works. Thanks for your help.
=iif(Fields!ScheduleDate.Value > Now() and Fields!Activity.Value ="Cancelled","Red",
iif(Fields!ScheduleDate.Value < Now() and Fields!Activity.Value ="Created","Green","Red"))