A search box is just the matter of adding a QTextBox and QButton, and making an event on the QButton to set a datagrid/etc's DataSource.
For text searching, you have to make a custom LoadArrayBySearchString() and CountBySearchString().
I use this for an e-commerce product search to match fulltext searches by SKU, Name, and Description. In my LoadArrayBy, I take the search string and pass it to SqlVariable (after I parse it with PrepareSearchString for matching how I like it--below):
$strSearch = QApplication::$Database[1]->SqlVariable(self::PrepareSearchString($strSearch));
Then just add the following string to the query in your custom LoadArrayBy function:
sprintf('MATCH (`product`.`sku`,`product`.`name`,`product`.`description`) AGAINST (“%s” IN BOOLEAN MODE)', $strSearch);
The problem is Qcodo maintains to be database-neutral, and every database handles such searches in its own way. I'm not sure how this would work out on the examples site. There are already datagrid controls, etc... the only difference would be you'd have the textbox to type your term in, and use your custom filtering function to load your data.
(included for completeness)
private static function PrepareSearchString($strSearch) {
if (strlen($strSearch) < 3) return '';
$delimiters = ',.; ';
$word = strtok($strSearch, $delimiters);
$words = array();
while ($word) {
$words[] = $word;
$word = strtok($delimiters);
}
$temp_string = $words[0];
if (count($words) > 1) {
for ($i = 1; $i < count($words); $i++) {
$temp_string .= ' '.$words[$i];
}
}
return $temp_string;
}