[vtkusers] VTK+Qt on ubuntu 9.10
Jothy
jothybasu at gmail.com
Thu Aug 5 08:36:03 EDT 2010
Try vtkWidget->Show() without repaint it should work even without Render() call.
Jothy
On 8/5/10, ruben.hernando.vaca at upc.edu <ruben.hernando.vaca at upc.edu> wrote:
> Hi Jothi
>
> Thanks!!!!! the problem is solve but :( the color appears one second
> (in this case red color ) and later it disappears again.
>
> MainWindow::MainWindow(QWidget *parent) :
> QMainWindow(parent),
> ui(new Ui::MainWindow)
> {
> ui->setupUi(this);
> vtkWidget = new QVTKWidget(this,QFlag(0));
> ui->verticalLayout->addWidget(vtkWidget);
> ui->verticalLayout->update();
> ren = vtkRenderer::New();
>
>
> vtkWidget->GetRenderWindow()->AddRenderer(ren);
>
>
> ren->SetBackground(1.0,0.0,0.0);
> vtkWidget->repaint();
> }
>
> I need repaint the vtkWidget in a loop without addRenderer.
>
> Thanks for all
>
> Ruben
>
>
>
> Quoting "David Doria" <daviddoria+vtk at gmail.com>:
>
>> On Thu, Aug 5, 2010 at 7:46 AM, <ruben.hernando.vaca at upc.edu> wrote:
>>> Hi Jothy
>>>
>>> renderer? this is a variable "ren":
>>>
>>> in my .h i have:
>>>
>>> QVTKWidget* vtkWidget;
>>> vtkRenderer* ren;
>>>
>>> and .cpp
>>>
>>> ren->Render();
>>>
>>> I don't understand.
>>>
>>> Thanks for all
>>>
>>> ruben
>>>
>>>
>>>
>>>
>>>
>>> Quoting Jothy <jothybasu at gmail.com>:
>>>
>>>> I think you should call renderWindow->Render() not renderer->Render();
>>>>
>>>> It works fine on my m/c with the same setup (vtk+qt+qtcreator).
>>>>
>>>> Jothy
>>>>
>>>> On Thu, Aug 5, 2010 at 12:18 PM, <ruben.hernando.vaca at upc.edu> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Well, this is my problem when I debut on QT + VTK + QTCREATOR:
>>>>>
>>>>> MainWindow::MainWindow(QWidget *parent) :
>>>>> QMainWindow(parent),
>>>>> ui(new Ui::MainWindow)
>>>>> {
>>>>> ui->setupUi(this);
>>>>> vtkWidget = new QVTKWidget(this,QFlag(0));
>>>>> ui->verticalLayout->addWidget(vtkWidget);
>>>>> ui->verticalLayout->update();
>>>>> ren = vtkRenderer::New();
>>>>> vtkWidget->GetRenderWindow()->AddRenderer(ren);
>>>>> ren->SetBackground(1.0,1.0,1.0);
>>>>> ren->Render();----------------------->PROBLEM!!!! -->>>The inferior
>>>>> stopped because it received a signal from the Operating System.
>>>>> Signal
>>>>> name : SIGSEGV - Signal meaning : Segmentation fault
>>>>>
>>>>> }
>>>>>
>>>>> When I debut, with Qtcreator everything is ok until the instrucction
>>>>> ren->Render() is executed and have the message: The inferior stopped
>>>>> because it received a signal from the Operating System. Signal name :
>>>>> SIGSEGV - Signal meaning : Segmentation fault.
>>>>>
>>>>> I have the same message when at the command line i use qmake, make....
>>>>>
>>>>> My Desktop PC has: Ati X1300, the openGL runs so good and the qtdemo
>>>>> is
>>>>> ok.
>>>>>
>>>>> On the other hand I have laptop HP with the same S.O ubuntu 9.10 and
>>>>> run
>>>>> QT+VTK+QTCreator, the different thing is the Card which is the NVIDIA,
>>>>> but i
>>>>> don't thing so it would be that because the openGl runs so good in my
>>>>> Desktop PC.
>>>>>
>>>>> Another things is that in the Desktop PC I display two monitors in
>>>>> dual-mode thats mean that the graphic card configuration is good.
>>>>>
>>>>> What happened?? I know, there are three topics QT,VTK and linux but I
>>>>> so
>>>>> sure the problem is VTK.
>>>>>
>>>>> Thanks for all
>>>>>
>>>>> Ruben.
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>
>> In this context it would be
>>
>> vtkWidget->GetRenderWindow()->Render();
>>
>> Thanks,
>>
>> David
>>
>
>
>
More information about the vtkusers
mailing list