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-&gt;SetSplitMultiComponentColumns(true);<br>  tableView-&gt;AddRepresentationFromInput(table); //check here<br>  tableView-&gt;Update(); <br>  tableView-&gt;GetWidget()-&gt;show();<br>
<br><div class="gmail_quote">On Tue, Oct 20, 2009 at 1:22 PM, Jeff Baumes <span dir="ltr">&lt;<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>&gt;</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">&gt; Now, I am trying to run the following code that runs an SQL query, and<br>
&gt; displays the results as a text output. But this part does not display the<br>
&gt; SQL results in a  tabular form. The table is empty and the program crashes.<br>
&gt; I mainly used the code in TestVtkQtTableView.cxx, TestSQLiteDatabase.cxx and<br>
&gt; several other related test programs.<br>
&gt;<br>
&gt; Do I need to change anything in the following two blocks of code? why<br>
&gt; doesn&#39;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 &quot;empty&quot;. 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 &quot;dump&quot; the output table to see what it is<br>
with table-&gt;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>