[Interest] QClipboard data info

André Somers andre at familiesomers.nl
Thu Apr 30 16:32:20 CEST 2015


Berkay Elbir schreef op 30-4-2015 om 15:07:
> Hello guys,
>
> I want to ask a question to you. I want to copy data from excel file 
> or etc. and paste to specific parts of my application, for example, 
> table widget or text edit. I can get data with QClipboard and can 
> paste to text edit easily. But How I can paste to table widget and how 
> can I access the data info copied to clipboard? For example, I copied 
> data from excel sheet with 4 rows and 3 columns and I want to paste 
> them in my table widget respectively. How can I do some checking on 
> this data?
The text you get from Excel is basically just a tab-separated format. 
So, each cell is differentiated by tabs, each row with a newline. If you 
paste something containing multiple lines and the name number of tabs (0 
or more) on each line, you can just split the data using these lines and 
tabs and put the contents into the respective cells. That should be easy 
enough.

André




More information about the Interest mailing list