On the desktop most of the application looks like this:
One of the many things which is nice about widget based projects and the designer is that we get some really good widgets and can (usually) see what things will look like before we compile. That file chooser is all built in and the calendar select widget is already there for us to use.
void MainWindow::importAction() { QString fileName = QFileDialog::getOpenFileName(this, tr("Lotto Data to Import"), QDir::current().dirName(), tr("Text Files (*.txt *.csv)")); if (fileName.length() > 0) { showImportFields(true); dbIO.importData(fileName); } }
That one line in bold is all I needed to toss up the fully functional dialog. For those unfamiliar with tr(), Qt has an awful lot of language translation capabilities built in. You are encouraged to use tr() around strings whenever your shop hasn’t moved to translation IDs. I’m really bad about not using tr() in my own stuff. In truth it is because so many projects wait until the end.
Why not? You need to have a final full code review anyway. Unless you are allowing for user selected language rather than OS or environment variable selection it’s a small thing. On one project, when we got to the bug fixing stage, one of the developers wrote a quick shell script which searched through the files for anything in double quotes and dumped it into a spreadsheet file along with source file name, line number and other info and we fed it to the translation team.
A few weeks later we received the first cut from translation and that same person spent one hour integrating the translations. The QA team found the spots where the same thing should have been translated two different ways due to context and we went from there.
As soon as I get some more time I will return to the 6-core AMD and see what else I need to install to cross compile this application for my Raspberry Pi. I’m torn between showing you the way you will probably try on your own and the “recommended” way.
The cheat method many try is to install the precompiled version from the Raspbian repos on both. Since I have a shiny new SD card, I will most likely start clean via the recommended way. Still haven’t decided. As I said near the beginning of this I typically join a project once system setup has been both decided and documented. On FDA regulated projects it is mandatory to have a cookie cutter configuration document.
EDIT:
Ooops, thanks for the reminder. Here is the source.
Sorry about forgetting to post it.
Related Posts:
Where Did My QDebug Output Go?