WTableCell focus lost
How do I catch when the user has clicked away or tabbed away (focus lost) from a WTableCell?
I've tried: blurred().connect( this, &WtTableCell::focus_lost );
Updated by Gunnar Skogsholm about 6 years ago
Ok, I figured it by trial and error. For the click events, I attached to signals from WTableCell, but in this case, I needed to attach a function to the child widget of that WTableCell:
auto editWnd = new Wt::WTextArea( fieldData->string_value() );
auto tableCell = gridCtl->elementAt( Rec, left() ); // triggers WtTable::createCell
tableCell->addWidget( editWnd );
editWnd->blurred().connect( dynamic_cast<WtTableCell*>(tableCell), &WtTableCell::focus_lost );
The documentation should be updated to close this issue out.