I want the user to be able to select only one cell at time. How can I set the maximum possible selection of cells of a QTableView to 1 (c++) ?
Set selectionMode to SingleSelection and set selectionBehavior to SelectItems
tableView->setSelectionMode(QAbstractItemView::SingleSelection);
tableView->setSelectionBehavior(QAbstractItemView::SelectItems);
Related
I have a PowerBI sheet consisting of multiple visuals and one slicer. The underlying data set includes one column called "selected" consiting of either "1" or "null". I want the slicer to always be default setted to only show data where the data entries in column "selected" are equal to "1". I want that the user is still possible to modify the selection and then be able to press a button to return to the pre-selection. I found no way possible to do this. Do you guys have any idea? I am pretty new to PowerBI.
I only found a way to pre-select the whole sheet or slicer to only show values where "selected" =1 but I want the user to be able to further select data. Also I only saw solutions for pre-selected slicer based on dates (e.g. most recent date is pre-selected).
What you need to do is to preselect all filter and save "bookmark" (view tab in powerbi desktop); Then you can assign a bookmark to the button.
Read this article:
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks?tabs=powerbi-desktop
I'm on Oracle APEX18.2
I have an Interactive Grid where two columns are Popup LOV based. The return value of these is text.
However I'm not able to have the column filtering feature work for these columns in the interactive grid.
When I click on the column header of these columns the filter drop down comes up empty. Even the Inetractive grid search-box doesn't search these columns. I cannot see the filter options in the attributes of these columns in the developer. I can see it for the other columns in the grid.
Is this a bug? Is there a way to have the search work for these columns?
As not much details listed here, I can see below possibilities :
return_value and display_value are not marked correctly in your LOVs causing empty list
You will also need to have default value in case you want preloaded data
Ensure you have cascading LOV parent item for 2nd LOV popup to populate data dynamically. ->
Do the following steps in your Apex Page Designer
Click on the Modal LOV column in the IG.
In the Attributes of the column search for Column Filter
Column Filter -> LOV Type => Use List of Values.
Image showing where to enable column filter
Note: If you have filled the Cascading LOV Parent Column(s) property in List of Values Section then the Column filter will be hidden because the LOV has a parent column and so apex will not be able to filter the column (Oracle Support Ticket Link)
I have a requirement to build a table widget for sitecore 8 update 5. They should be able to choose the number of columns from 1 to 6 and then edit the content of the table in experience editor.
I know tables can be created using the rich text editor but they really want this widget.
Finally my question is being new to sitecore what would be the recommended approach in building this widget? Keeping in mind they want to be able to choose the number of columns between 1 to 6 and with as many rows as they want and edit in experience editor.
I have done this in the past by using a hierarchy of child items. The data source for your Table rendering may have a field for a header or styles and its children define the rows. Rows have children to define cells. You can use edit frames with insert, delete and move up/down buttons for both rows and cells. If you need to limit columns to 6 or fewer, you may need to implement a custom button rather than use the standard insert button. The cells can then have whatever fields you need or dynamic placeholders.
I want to highlight the entire row of a my QTableWidget when I click on one cell of this row.
I already put a connection between an activation of my cell and my function highlightRow :
QObject::connect(ui->variableTableWidget,SIGNAL(cellActivated(int,int)), this, SLOT(highlightRow()));
Now I have to write my function, but I don't know how could I know which cell is activated.
Is there a function in the QTableWidget that is suppose to return all activated cell ?
Call this on your table widget when it is created
setSelectionBehavior(QAbstractItemView::SelectRows);
this will make it so that when you click on a cell that row is selected
I represent same data in QTreeView with QStandardItemModel. Data is table - I have rows and columns, I get it from DB with QSqlQuery. How can I filter rows based on some column value? For example I have third column some integer value, and by clicking some button I want to show only rows with this number > 10. I can perform another QSqlQuery.exec, but it is possible to do so with QTreeView or QStandardItemModel?
To filter out data you may use QSortFilterProxyModel. By overriding other methods you can format data in underlying model, so there is no need to fill QStandardItemModel on your own and use QSqlTable model as a source instead.