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. <br>
<br> VTK_CREATE(vtkQtTableView, tableView);<br> tableView->SetSplitMultiComponentColumns(true);<br> tableView->AddRepresentationFromInput(table); //check here<br> tableView->Update(); <br> tableView->GetWidget()->show();<br>
<br><div class="gmail_quote">On Tue, Oct 20, 2009 at 1:22 PM, Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">> Now, I am trying to run the following code that runs an SQL query, and<br>
> displays the results as a text output. But this part does not display the<br>
> SQL results in a tabular form. The table is empty and the program crashes.<br>
> I mainly used the code in TestVtkQtTableView.cxx, TestSQLiteDatabase.cxx and<br>
> several other related test programs.<br>
><br>
> Do I need to change anything in the following two blocks of code? why<br>
> doesn't the query fill the table with data?<br>
<br>
</div>I believe SQL queries are one-time-use objects, so once you traverse<br>
them once, they will be "empty". Try getting rid of your initial<br>
manual traversal, or create a new query for the vtkRowQueryToTable<br>
filter.<br>
<br>
Another useful thing is to "dump" the output table to see what it is<br>
with table->Dump().<br>
<font color="#888888"><br>
Jeff<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>My web page: <a href="http://www.cs.rpi.edu/~vargua">http://www.cs.rpi.edu/~vargua</a><br>