Not getting headers on WTableView with QueryModel
Added by Jim Garvin over 10 years ago
This looks like it should be really easy so I must be doing something wrong. I'm just trying to build a simple http table from sqlite table. I'm using Wt::WTableView and Wt::Dbo::QueryModel. I get the table on the page but I never get headers regardless if I use
addColumn or addAllFieldsAsColumns
Below is the code snippet and attached is a image of the results
---snippet---
@
using namespace Wt;
namespace dbo = Wt::Dbo;
dbo::QueryModel< dbo::ptr > *model = new dbo::QueryModel< dbo::ptr >();
model->setQuery(session*->session*.find());
model->addColumn("name");
model->addColumn("origin");
WTableView *view = new WTableView(this);
view->resize(600, 300);
view->setSelectionMode(SingleSelection);
view->setModel(model);@
Tabel.tiff (43.7 KB) Tabel.tiff | image of results |
Replies (1)
RE: Not getting headers on WTableView with QueryModel [SOlVED] - Added by Jim Garvin over 10 years ago
I removed the .deb packages and compiled from source. It works fine now