<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Utkarsh,<br>
<br>
I finally got my widget to work more or less like I want! FYI I
created a long StringVectorProperty with the following xml code:<br>
<br>
<blockquote><tt> <StringVectorProperty name="OutlierFilters"</tt><br>
<tt> command="AddOutlierFilter"</tt><br>
<tt>
clean_command="CleanOutlierFilters"</tt><br>
<tt> number_of_elements="0"</tt><br>
<tt>
number_of_elements_per_command="14"</tt><br>
<tt> element_types="2 2 2 1 0 0 1 1 1 1
1 1 1 1"</tt><br>
<tt> repeat_command="1"></tt><br>
<tt> <Documentation></tt><br>
<tt> Define which outlier filters to use and in which
order.</tt><br>
<tt> </Documentation></tt><br>
<tt> </StringVectorProperty></tt><br>
</blockquote>
<br>
and I created a Q_PROPERTY on my widget of QStringList type, with
functions to create the string from internal data and to set the
internal data from the string. This way all the internal data is
serialized through this string.<br>
<br>
I still have some problems to address:<br>
<ol>
<li>When I click on Apply button in the filter with my custom
widget the RequestData() method of my vtkPolyDataAlgorithm
subclass is not being called, but if I change the parameters of
any filter before this one in the pipeline then it's called. Do
you know what's going wrong here? Maybe I'm forgetting to call
something like pqPropertyWidget::changeAvailable()?</li>
<li>I would like to have one of the properties of my widget to be
populated with the names of the input arrays. Can I do it from
the C++ code?</li>
</ol>
<p><br>
Best,</p>
<p>Ellon<br>
</p>
<br>
<div class="moz-cite-prefix">On 05/24/2016 04:42 PM, Utkarsh Ayachit
wrote:<br>
</div>
<blockquote
cite="mid:CADHSJjCD8s+RVDksrhVWWBHaYNdtL_m=eA7xH1HrUOXdSXzWRw@mail.gmail.com"
type="cite">
<blockquote type="cite">
<pre wrap="">Quick question: is there a way to have a vector property that has N
elements, but only exhibit one of them? If yes, can a descriptor be used to
control which of the vector elements is exhibited?
</pre>
</blockquote>
<pre wrap="">
Not by default, you can create a custom widget for the same, however.
</pre>
</blockquote>
<br>
</body>
</html>