[Paraview] Custom Qt Filter Panel

Robert Maynard RobertJMaynard at gmail.com
Mon Nov 5 14:16:03 EST 2007


Thanks for the help. I have found the problem being how it qt / paraview
handles relative paths. Instead of the file using the path for plugin .so
being the root, it actually uses the runtime directory as the root
directory. Which means if I launch paraview from  my home directory, or from
the bin exactly I get different expectations on where my UI file should
reside.

The solution to this seems to be that the paraview developers have used a
:/pqWidgets link to handle this problem, but I would like to know if there
is a away for me to set the relative path starting directory to where the
.so or the source code resides.

(The way i found this out, was i dumped absolute file paths using QFileInfo
inside pqLoadedFormObjectPanel )
>
>
>
> On 11/5/07, clinton at elemtech.com <clinton at elemtech.com> wrote:
> >
> >
> > You can call isValid() at the beginning of the constructor to verify
> > your UI
> > file loaded correctly.  If not, you're most likely missing the prefix
> > path to
> > it so it matches what you put in your .qrc file.
> >
> > Or the ui file you created doesn't have a pqDoubleRangeWidget or it
> > isn't
> > named "ThresholdBetween_0".
> >
> > Clint
> >
> > On Monday 05 November 2007 11:10:24 am Robert Maynard wrote:
> > > I am trying to make a custom UI panel based on the current Threshold
> > panel.
> > > So far I created the UI file and copied and modified the pq files for
> > the
> > > UI.
> > >
> > > The problem is I get this error when loading the filter:
> > >
> > > QObject::connect: Cannot connect (null)::valueChanged(double) to
> > > SumBillboardPanel::upperChanged(double)
> > > QObject::connect: Cannot connect (null)::valueChanged(double) to
> > > SumBillboardPanel::lowerChanged(double)
> > >
> > >
> > > Which references this section of my file:
> > >
> > > pqSumBillboardPanel::pqSumBillboardPanel(pqProxy* pxy, QWidget* p) :
> > >   pqLoadedFormObjectPanel("SumBillboard.ui", pxy, p)
> > > {
> > >   this->Lower =
> > > this->findChild<pqDoubleRangeWidget*>("ThresholdBetween_0");
> > this->Upper =
> > > this->findChild<pqDoubleRangeWidget*>("ThresholdBetween_1");
> > >
> > >    QObject::connect(this->Lower, SIGNAL(valueChanged(double)),
> > >                     this, SLOT(lowerChanged(double)));
> > >    QObject::connect(this->Upper, SIGNAL(valueChanged(double)),
> > >                     this, SLOT(upperChanged(double)));
> > >
> > >   this->linkServerManagerProperties();
> > > }
> > >
> > > Now I think the problem is that the UI file isn't being loaded
> > properly,
> > > but I have no clue why as everything is in the same directory and
> > named
> > > correctly. Does anybody have any tips on getting this to work?
> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/paraview/attachments/20071105/4e50a66a/attachment.html


More information about the ParaView mailing list