from dcop import *
from qt import *

app = DCOPApplication( "kspread" )

table = app.default.getDocuments()[0].map().table("Table1")

table.setSelection( QRect( 2, 2, 4, 6 ) )

rect = table.selection()
print rect

print "done"
