[vtkusers] qcombobox as a child of qvtkwidget doesn't show up on mac.

Simon ESNEAULT simon.esneault at gmail.com
Tue Jan 5 13:05:28 EST 2016


Hello,

Well from my experience, it's is not easy to draw a qt widget on top of a
QVTKWidget, especially on OSX.
You can try to add some Qt flags (Qt::Tool or Qt::WindowStaysOnTopHint) to
the combobox. This may or not work, depending the version of Qt you're
running, and it may also introduce some weird behavior ...

I would rather advice you put the widget beside the QVTKWidget, in a
vertical/horizontal layout, or you use some of VTK widget if you really
want to draw within the view (use a TextureButton together with a qt popup
menu for example)

Good luck
Simon

2016-01-05 18:52 GMT+01:00 rakesh patil <prakeshofficial at gmail.com>:

> Hello,
>
> I have derived my own class from QVTKwidget class. In the constructor of
> the class I am creating a combo box whose parent will be QVTKwidget.
> Example:
>
> Class mywidget : public QVTKwidget
> {
>    public:
>       mywidget ();
> };
>
> mywidget::mywidget ()
> {
>   ...
>   ...
>
>   mycombo = new QCombobox (this);
>   mycombo->setGeometry (0, 0, width, height);
>   ...
> }
>
> on MAC, the combo box appears below QVTKwidget and all vtk objects are
> rendered on top of the combo box, thus hiding it behind QVTKwidget. I need
> the combo box to appear above(on top of) QVTKwidget at top left corner. Can
> anyone help me to overcome this problem. ?
>
> Thanks
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>


-- 
------------------------------------------------------------------
Simon Esneault
Rennes, France
------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160105/d577f642/attachment.html>


More information about the vtkusers mailing list