Posting time spent on the Pro-D expenses claim for my TESOL conference attendance.
Working through an example project.
Put an hour into some more QT background reading (on, among other things, QTs pointer wrappers, QActionGroup, QCache, and QNetworkAccessManager).
The library has a new repro stand (one of these). I went over for an orientation this morning.
From a post by LB, I learned about tree-tagger, which I've downloaded, installed, and briefly tested. It seems to work very well, producing POS-tagged text from input. I also grabbed LB's aftertag.pl PERL script, which is supposed to turn the tree-tagger output into good TEI.
Unfortunately, the PERL script doesn't want to run -- there are several errors:
syntax error at aftertag.pl line 7, near "<" syntax error at aftertag.pl line 7, near ";) " Unmatched ) in regex; marked by <-- HERE in m/<!--) <-- HERE { # tag found<br / at aftertag.pl line 10.
Figured that perhaps the HTML entities were the product of the publishing engine on LB's blog site, so replaced them with angle brackets in line 7. That left me with the line 10 error, which I still haven't figured out. I'll come back to this, because it will be really useful.
Continuing work on my pilot application, I've been trying various methods of getting a directory listing and displaying it with SVG icons representing the files, and checkboxes for selecting items in the list. After some testing with QDir and QListView, it seems that I want QDirModel and QTreeView, with a QAbstractItemView descendant to handle the display of rows. Meanwhile, I'm still struggling with the way C++ (or Qt?) uses pointers for objects. I need to do some methodical programmed study in parallel with my exploratory hacking -- hopefully there'll be time for that before Christmas.
I've sorted all my SVG icons and renamed the according to group_identifier-qualifier, as in for example search_find-again.svg
or edit_select-all.svg
. There are 179 of them. When I get a chance, I'll build them into a resource file in QT; I think that's just going to be the simplest way to use them. I can't get QT's resource editor to run today, for some reason, but it worked the other day, so I'll come back to this.
I've made a start on the first sub-application in preparation for IMT, which will be the SVG icon infrastructure (making SVG icons available to QActions through a convenient lookup system). This is not a bad thing to start with. I don't have anything working yet because I'm still struggling with the basics of C++, but I've made some early decisions and started to figure out how best to organize my code and files.
Finally figured out how to get a Windows executable compiled on one Windows machine to run correctly (with SVG icons) on another Windows VM without QT installed. Here are the steps:
- Build for release, and take the exe in the release folder of the project.
- Copy the following files from
c:\Qt\[release_date]\qt\bin\
(NOT the \bin\ which is one folder further up the tree):- mingwm10.dll
- QtCore4.dll
- QtGui4.dll
- QtSvg4.dll
- Take the
\plugins\imageformats
folder from the same location, and copy it into a\plugins\
folder alongside the executable. (This is all that's needed for my simple SVG test app; you may need other plugins too.) - Create a text file called
qt.conf
in the same folder as the executable, and put this in it:[Paths] Plugins = plugins/
This tells the QT code to look for plugins in this subfolder of the main app. Otherwise it will look for a full QT installation on the target machine, and not find it. Plugins seem to be late-binding, and the app is able to fail gracefully (by not displaying SVG icons) if it can't find the plugins.
This works for an exe compiled on 64-bit Windows 7 or on 32-bit Windows XP, running on a separate 32-bit XP system.
I now have a clean XP VM provided by Greg, with only QT on it, for this kind of task. Now I need to see if I can make a Linux app portable in the same way; then it's Mac time.
Today I was looking at QStringList and QMessageBox, and also taking a preliminary look at the XML stuff. I've also been fighting with the deployment issues again. The situation is that the application compiled on 64-bit Win7 will run on 32-bit XP, but the SVG icons don't work. I've tried every permutation I can think of for the deployment dlls, but nothing works; although the app gives no error. My plan now is to create another simple XP 32 VM, install QT on there, and compile the app there; perhaps that'll give a working executable on a similar system with no QT installed. The SVG icons are going to be important to us, so I'd like to get this sorted ASAP. We should also try the same thing on a Mac, to see what dependency issues we need to prepare for there.
Tried using one of Greg's stripped-down VMs for this, but after doing Windows Updates to get it up to speed, it would no longer boot. Curses.