ApostropheCMS V3 : How to have a Selected item in one widget trigger reactively displayed content in another widget in the same page client-side - data-binding

I have 2 widgets in a Page.
The first widget displays a list of items names.
The other widget displays details of the selected item in the first widget.
Similar to filtering mecanism for piece-type.
How can I implements this kind of reactivity of widgets client-side ?

Related

How to Refresh the Recyclerive List Items UI Paging 3

The problem is that whenever I call adapter.refresh(), new items are added but the previous item's UI is not refreshed.basically a button showing in list item ,by click on that button doing something in another activity when i return back it should hide .

How to open editor outside of qlistview?

The QAbstractItemView::openPersistentEditor method calls the createEditor method reimplemented in a class inherited from the QStyledItemDelegate class. It opens a widget inside the current item. But my task is to show the editor widget in some custom way. Say, under the current item, but with it's right border outside of the scroll area of the view. And it's height being far more, than just one item's height. Is there any way to do it?
It opens a widget inside the current item because the current item its parent.
One of the solutions is the following: you provide a simple editor widget which is shown inside the current item, which really does not provide editing, only data exchange.
But this editor widget creates custom widget as a dialog or as a widget whose parent is the topmost ItemView. Or you can delegate the creation of the custom editor widget to the ItemView. The result of the editing is sent to the in-item editor widget which does the job of providing the ItemView with newly edited data.

Want to re-instantiate a component when navigating to same aux route

I have a list of items with Actions drop-down for each item in the left-section of page. I also have a right rail which displays a different component based on action type selected. I'm using aux-route to accomplish this.
One of the Action the user can take is "edit" where in a form is displayed to edit the metadata of the list item. While editing, user can click on + button next to some of the input field to add another input field dynamically.
Now my problem is, when the edit-form is open for a list item and I click edit on another item in the list, I wanted my edit-component to be re-instantiated.
Because the aux-route is same for all the list items for edit-action, edit-view is not instantiated once again. Is there a way to achieve it?
Right now fixed it with RouteReuseStrategy

QWizard with pagelist on the left

I have a Qt QWizard in my project. I want it to have a pagelist with titles of my wizard pages. Also I want in this pagelist current page to be somehow checked.
You have to implement a widget which has a QListWidget on the left and a QWizard on the right.
The list widget shows a list of all available pages (use QWizard::pageIds) of the wizard and every time a page is changed (QWizard::currentIdChanged) you update the check state of each item in the list, using QWizard::visitedPages which gives you a list of IDs of the pages which were already visited.
Remember that for the items in the list widget you have to manually set the flag Qt::ItemIsUserCheckable.
QList QWizard::visitedPages () const
Returns the list of IDs of visited pages, in the order in which the pages were visited.
Pressing Back marks the current page as "unvisited" again.
Everything written below is relevant for Qt 5.15.
First of all, I have not created a widget that includes a wizard and a list, as #Exa wrote. I just add list widget as side for wizard with method QWizard::setSideWidget:
listPages = new QListWidget;
// Also added a flag that the list item cannot be selected
listPages->setSelectionMode(QAbstractItemView::SelectionMode::NoSelection);
setSideWidget(listPages);
And secondly i have defined a slot for the signal QWizard::currentIdChanged where I can change color and whatever to change the view of the list:
connect(this, &Wizard::currentIdChanged, this, &Wizard::OnPageIdChanged);
...
// To change listwidget states
void Wizard::OnPageIdChanged(int id)
{
// Do whatever you want with QListWidget
}

Can I make QCompleter complete inline and show a popup

Qt 4.5 (PyQt 4.6.1)
I'm looking for a widget similar to a QComboBox that automatically filters its entries to the ones starting with the input in the text field. There are around 300 items in the combo box.
I've tried two approaches:
QLineEdit with QCompleter
Advantages
Filtering the items works.
Disadvantages
Doesn't show a popup if the text field is empty.
Doesn't do inline completion.
Allows to insert items not in the list.
Editable QComboBox with insertion set to no
Advantages
Nice popup
Completes inline in the text field.
Disadvantages
No filtering
Input is only possible in either the text field or the popup. Clicking on the popup doesn't select the best-matching item in the popup.
What I need
A popup to select the items.
Slow tippers should be able to start tipping the name of an item and the popup switches to the best matching one.
Preferably I should filter the items so that only partially-matching items are shown.
Concerning you first try with QLineEdit, you can set the completionMode to do it inline.
For your second try, you can add a QCompleter object to you QCombBox in order to filter your items as you want.The QCompleter member of the QComboBox is to offer an easy way to use QCompleter.
Anyway, if you are not satisfied with this method, you can manage a QCompleter object by yourself. This allows you to choose how item list is display (using any views) and to define items order in the list. See basic QCompleter details.

Resources