No Disconnect

Things I’d rather not forget

Archive for the ‘Qt’ Category

DLL Hell in Qt

leave a comment »

With Qt, it is necessary that the application and the DLLs it links to have to be compiled by the same version of MinGW (g++; assuming a Windows environment, of course). If you don’t do this you get frustrating errors about DLL’s not containing appropriate links. What makes this fun is that there is no way of telling (to my knowledge) with which version of g++ a dll was compiled with.

More fun: as of Qt 4.6, the binaries that ship with the SDK, in \Qt\2009.05\bin, were compiled with g++ 3.4.2. There are other binaries in \Qt\2009.05\qt\bin that seem not to have been (don’t know what they were compiled with, actually). The headache is that Qt installs the latest MinGW in \Qt\ directory also.

Qt has left an old version of MinGW on its FTP server, so you can install that as well. But, you need to make sure that the MinGW that is in your PATH matches the binaries that are in your path. (Which pretty much means four possible combinations of path variables, one of which will work.)

It is possible to recompile the binaries for Qt using configure and make. But, with MinGW it is rare or impossible (in my experience, the latter) to be able to compile WebKit (the web browsing API). So, if you need that (as I did), you have to use the binaries that they ship.

Written by nodisconnect

January 20, 2010 at 4:11 am

Posted in Qt

Lessons learned from a frame-based PHP/SQL/JavaScript web application

leave a comment »

  • Get the data structures right immediately, and forget about it. (Especially SQL tables, since adding columns can make you have to rewrite all of your queries later on.)
  • Start with an empty database so that the displays for initial conditions (i.e., telling users to enter data) are met at the start.
  • Then move on to the most complex conditions.
  • For frames:
    • Put all of the data in one place, at the top level of the window.
    • Load data from the database in a hidden frame, which you will be able to refresh.
    • Place draw functions at the highest level, so that frames can be refreshed from anywhere.

Written by nodisconnect

December 9, 2009 at 2:09 am

Posted in Qt, WWW, XML & Friends

Follow

Get every new post delivered to your Inbox.