Actions
Bug #2588
closedItem delegates for WTableView in WBootstrapTheme
Start date:
01/22/2014
Due date:
% Done:
0%
Estimated time:
Description
My previous ticket was set to 'resolved' and I can't update its status, so I'll write here.
I use Wt 3.3.1 and have problem with standard delegate position inside cells in WTableView
in WBootstrapTheme
.
This is my example:
Wt::WApplication*
createApplication(const Wt::WEnvironment& env)
{
Wt::WApplication *app = new Wt::WApplication(env);
app->setTheme(new Wt::WBootstrapTheme(app));
Wt::WStandardItemModel *model = new Wt::WStandardItemModel(app);
for (int i = 0; i < 10; ++i)
{
std::vector<Wt::WStandardItem*> row;
for (int j = 0; j < 5; ++j)
{
Wt::WStandardItem *item = new Wt::WStandardItem;
item->setText(Wt::WString("{1}/{2}").arg(i).arg(j));
item->setFlags(Wt::ItemIsEditable);
row.push_back(item);
}
model->appendRow(row);
}
Wt::WTableView *view = new Wt::WTableView;
view->addStyleClass("form-horizontal");
view->setModel(model);
view->setEditTriggers(Wt::WAbstractItemView::SingleClicked);
view->setRowHeight(28);
view->setItemDelegate(new Wt::WItemDelegate(view));
app->root()->addWidget(view);
return app;
}
Even if I copy-paste this example code I have the same problem.
If I reimplement the WItemDelegate::createEditor
method and return a WComboBox
as an editor, it has correct size and postion, but the same doesn't work for WLineEdit
and WSpinbox
as delegates.
Updated by Koen Deforche almost 11 years ago
- Status changed from New to Resolved
Updated by Koen Deforche almost 11 years ago
- Target version changed from 3.3.1 to 3.3.2
Updated by Koen Deforche almost 11 years ago
- Status changed from Resolved to Closed
Actions