I'm trying to display a Font Awesome Icon in a Wt TableView. More specifically I'm using a Wt::WTableView to display a Wt::WStandardItemModel.
The following code shows how I fill the StandardItemModel. I use setStyleClass of the item to set it to the Icon.
for (auto ob : observing_blocks) {
int i = model->rowCount();
model->setItem(i,0, make_unique<Wt::WStandardItem>("text"));
model->setItem(i,1, make_unique<Wt::WStandardItem>("text"));
model->setItem(i,2, make_unique<Wt::WStandardItem>("text"));
model->setItem(i,3, make_unique<Wt::WStandardItem>("text"));
auto status_item = make_unique<Wt::WStandardItem>(" ");
status_item->setStyleClass("fas fa-spinner");
model->setItem(i,4, std::move(status_item));
auto si = make_unique<Wt::WStandardItem>("");
si->setCheckable(true);
model->setItem(i,5, std::move(si));
}
However, the result looks like this:
When I mark the last row (as done on the image above) it looks like the icon is assigned to the correct row, but the location is obviously wrong.
Any advice is appreciated.