PDA

View Full Version : Text editor questions



mtnbiker66
27th January 2012, 14:48
Good morning --

Got more of a "best practice" question than a technical one. I have a QSqlTableView that's displaying 2 columns of data. Due to size constraints of this part of my app, it's relatively small, holding only 3 lines of data. The use of the app needs to be able to enter hundreds of rows of data and has asked that I give him the chance to copy from a spreadsheet and paste the data instead of hand entering it, so I have created an "Edit" pushbutton that will display a dialog for that but I'm not sure if i should use a QPlainTextEdit widget or a QTextEdit one. The app is loaded with line edits, combo boxes, tableviews and such, but this is the first time I've needed to take data in in this fashion and not what the right approach should be and I can't seem to find any examples (ideally I'd like to enforce the format of the data but I'll cross that bridge later).

Also, obviously I need to get the data into and out of my tableview.

Opinions? Thanks!


Kodi

wysota
27th January 2012, 15:08
If you don't need to allow your users to enter (and display) richtext then go for the plain version.

mtnbiker66
27th January 2012, 16:21
No, I don't need rich text and was going to use the plain text editor because pasting from Excel can cause weird results in other editors, so I didn't want to take a chance.


Kodi