How can i know how many rows span my selection in a table??

Im my case, i have a qtexttable. When i select some cells, i'd like to know how many rows the selecion spans.......any idea???