C++ (Qt)if(spreadsheet->item(0,1) && spreadsheet->item(0,1)->text()!="") setWindowTitle(spreadsheet->item(0,1)->text());