Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 10

Qt-interest Archive, March 2002
QTable: really dumb question


Message 1 in thread

I have been writing Qt code for a while now, and should 
be able to figure this out, but I can't.  I have a  single-
selection full-row selection table containing results from 
a search.  Below this I have a button call "Select"  that 
connects to a slot for processing the current selected 
row in the table.  When the table is first populated, the 
first row is highlighted as if it were selected.  However, 
when I get the selection, it behaves as if nothing were 
selected.  So, the question is, how can I set the fisrt 
row as selected?  I tried addSelection() but after I call 
that, the first row gets selected, and then stays 
highlighted when the user selects another row with the 
mouse.  I want to be able to select the first row just as 
if the user had clicked on it with the mouse. 

Thank you,
James Hamilton
Systems/Software Engineer
Davis Tool, Inc.