Skip to content

Instantly share code, notes, and snippets.

View ianunruh's full-sized avatar

Ian Unruh ianunruh

View GitHub Profile
#include <stdio.h>
int main(int argc, char** argv)
{
int x;
printf("Enter the number to count up to: ");
if(scanf("%d", &x) != 1) {
printf("I don't think you know what a number is\n");
return -1;
}
@ianunruh
ianunruh / RecursiveSortFilterProxyModel.java
Created March 21, 2012 09:07
RecursiveSortFilterProxyModel
import com.trolltech.qt.core.QModelIndex;
import com.trolltech.qt.gui.*;
public class RecursiveSortFilterProxyModel extends QSortFilterProxyModel {
protected boolean filterAcceptsRow(int row, QModelIndex parent) {
if(super.filterAcceptsRow(row, parent)) {
return true;
}
QStandardItemModel model = (QStandardItemModel)sourceModel();