[vtkusers] Cannot open include file: 'QObject'
Aytekin Vargun
varguna at gmail.com
Tue Oct 20 16:34:47 EDT 2009
It works If I use the following block of code instead (It is taken from
TestQtSQLDatabase.cxx):
vtkQtTableModelAdapter* model = new vtkQtTableModelAdapter(table);
QTableView* view = new QTableView();
view->setModel(model);
view->show();
Please let me know If anybody knows why the first block does not work.
Thanks a lot.
By the way, I have been using VTK nightly for these experiments.
Aytekin
On Tue, Oct 20, 2009 at 1:54 PM, Aytekin Vargun <varguna at gmail.com> wrote:
> I just wrote some code to display the data in the table and it works. There
> is data in the table. It looks like the following code segment does not work
> as I expected. Also, a table shows up but it disappears quickly.
>
> VTK_CREATE(vtkQtTableView, tableView);
> tableView->SetSplitMultiComponentColumns(true);
> tableView->AddRepresentationFromInput(table); //check here
> tableView->Update();
> tableView->GetWidget()->show();
>
> On Tue, Oct 20, 2009 at 1:22 PM, Jeff Baumes <jeff.baumes at kitware.com>wrote:
>
>> > Now, I am trying to run the following code that runs an SQL query, and
>> > displays the results as a text output. But this part does not display
>> the
>> > SQL results in a tabular form. The table is empty and the program
>> crashes.
>> > I mainly used the code in TestVtkQtTableView.cxx, TestSQLiteDatabase.cxx
>> and
>> > several other related test programs.
>> >
>> > Do I need to change anything in the following two blocks of code? why
>> > doesn't the query fill the table with data?
>>
>> I believe SQL queries are one-time-use objects, so once you traverse
>> them once, they will be "empty". Try getting rid of your initial
>> manual traversal, or create a new query for the vtkRowQueryToTable
>> filter.
>>
>> Another useful thing is to "dump" the output table to see what it is
>> with table->Dump().
>>
>> Jeff
>>
>
>
>
> --
> My web page: http://www.cs.rpi.edu/~vargua<http://www.cs.rpi.edu/%7Evargua>
>
--
My web page: http://www.cs.rpi.edu/~vargua
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091020/7ee8bd05/attachment.htm>
More information about the vtkusers
mailing list