Saturday, March 25, 2006

My First Qt App

Well, not quite my first - I've written Hello World apps before. And I've hacked on plenty of KDE stuff. But this is my first app from scratch, and I'm well on my way. It took a while to decide where to start: KDE3 with Qt3, or Qt4 on its own? KDevelop or Kate? Autotools, Scons, Cmake or Qmake? Well, I plumped for Qt4, Kate and Qmake: Qt4 because it's newer than Qt3 and there's less to learn (and the API looks nicer); Kate because when I'm learning something it's nice to tie things together myself, without having to learn how KDevelop manages it's projects too; Qmake because all the Qt tutorials and things talk about it, and again, it seemed to put the least obstacles in the way of learning Qt.

So I now have a nice main window, a few dialogue boxes, saving and loading Xml files - most of the GUI for my app. All I have to do now is the hard part. The guts of the programme. What is it? You'll just have to wait and see. I don't want to go getting people's hopes up only to dash them to pieces in a few days when I realise I've bitten off more than I can chew.

Oh, just one problem: I have a QTreeView, with a QDirModel attached, and I'm trying to find out when the selection is changed. For the other lists and things I've got it working fine, but I've tried on_listView_selectionChanged, currentChanged, and various other combinations of things from the documentation, but no luck so far. Does anyone have any wonderful ideas how to make that work?

Appreciating SUSE

I never appreciated SUSE's installer as much as I did today, when I tried to install Solaris on my test machine (I wanted to test a piece of Java software on it). It timed out while I was reading some messages and made a default selection, which meant I had to restart the install; it offered software selections which I later discovered weren't on the DVD; for a while it thought I was Chinese; it seemed to ask the same questions about software installations several times; it told me I had 0 bytes and 7698Mb free on my hard disk at the same time; it wouldn't boot into X; I couldn't find a key which would work as delete once it had booted to the console; I logged into the console and then it forgot, and went back to the login prompt...

Two days ago I installed SUSE 10.1 Beta 8 on my laptop. Except for it not installing drivers for my wireless card, everything just worked. I guess once Solaris is installed it's probably a more enterprise-ready system. Maybe I should become a qualified Solaris dude - I might be able to make money helping people to install that stuff. If I can ever figure it out in the first place.

Sunday, March 12, 2006

Random People Want Ipods

I just checked out my freeipods website, and three people have signed up already. One is my brother, but the other two I've never heard of! If those people are readers of my blog - thanks! Only one has completed their offer, so the other two still need to, and I still need two more people on top of that to sign up, and then I get an iPod. Hooray! (If you're in the UK they have some quite good offers to sign up to).

Saturday, March 11, 2006

Aye Kororaa!

I just downloaded the Kororaa XGL Demo Live CD, and it blew my socks off! Although I'd seen the videos on Novell's website, I was expecting it to be unusable on my machine - just from past experience of flashy graphics on the desktop. But it worked, and it's awesome! It also wowed my non-geeky housemates. It was Gnome rather than KDE, but I hope that KDE will be able to look just as amazing with XGL eventually. I wasn't too keen on the way the menus popped up, but the rest of it looked great.

I also couldn't help liking how clean Gnome was looking. Of course, I wouldn't be able to switch because I like too much of KDE, but I think all KDE developers should occasionally look at Gnome so we can steal their ideas, just as I'd expect their developers to look at KDE and steal ours. Because by 'steal' I really mean collaborate.

Anyway, one of the things I prefer in Gnome to KDE is the way things feel a little more solid and neatly put together. Like when you click on the volume icon in the menubar at the top, the slider which appears is exactly the same width as the highlight on the icon - it makes it look like it was all designed to work together. Whereas KDE I know is designed to work together, but doesn't always look that way.

I just wish I had more time to develop KDE at the moment, but work is taking too much time, and in my free time I'm working on my wedding website, so unfortunately developing KDE is taking a back seat to using it.

Saturday, March 04, 2006

Something Changed

A while ago I spent ages setting up an .asoundrc file on my computer so that I could get sound to work properly. But I had to use dmix in order to get everything to mix properly. But today I tried to use wengo and it didn't like that I was using dmix, so I temporarily moved my .asoundrc file out of the way, and hey presto! wengo started working, and everything else carried on working as it should. Someone must have changed something while I wasn't looking! (It's happened before - the sound on my laptop used to be really choppy, and I spent ages fiddling with settings until it was nearly ok. And then one day I installed a new version of SuSE and it just worked.)

Now that everything on my computer works really well, it's probably about time for it the give up the ghost, and then I'll have to try to find another laptop which works under linux this well. After all, I've already replaced the CD drive (with a DVD writer), the backlight (twice), the power supply brick, the hard drive, graphics tablet cable (not actually part of the laptop though) and had to solder a couple of bits inside it - it can't have long left. But it's 1.6GHz with 1Gb of RAM and a 1400x1050 display, so it's still a great machine to work on, despite being over four years old, and I can't afford to replace it (not with the wedding coming up this year), so here's hoping it still has a few more years left in it.

Thursday, March 02, 2006

Dead Disk, Live Wireless

It's been an interesting few days. On Friday my hard drive crashed, leaving me considering sending my disk to a data recovery place and paying hundreds of pounds, as I didn't have a recent backup. I know, I'm an idiot! But first I tried connecting the drive to my desktop machine and running knoppix. Reiserfsck said my disk might be dead, but I didn't give up, I bought another sixty gig disk (unfortunately there weren't any 7200rpm ones at the local shop so I had to make do with a 5400rpm one), used dd_rescue to copy everything across, then ran reiserfsck again, and it looks like I haven't lost anything important. Hooray for ReiserFS! That was quite a relief, when I finally got it working again. So now I'm doing regular backups like a good boy.

Today I bought a Gigabyte GN-WIKG mini-pci wireless network card for my laptop, installed it, booted up SuSE, entered my wireless passphrase into YaST, and I was up and running and connected. I chose the card because of there being native, open-source drivers for it (rather than having to use closed source drivers and ndiswrapper), but I wasn't expecting it to be that easy! Now if only there was a good KDE utility for switching wireless networks on the fly, so I didn't have to use scpm. I'm sure there must be one somewhere. It'll be nice when wireless is as easy as on Windows XP.

Speaking of XP, I'm currently fixing a friend's laptop. They're running Windows XP, which is a mistake to begin with in my opinion, and had a corrupt registry. Which meant it blue-screens when booting. And when entering the recovery console. And when trying to do a reinstallation. But I've finally got it to work by putting the disk in my desktop computer, copying some registry files around, rebooting the laptop, copying some more files, rebooting into the recovery console, rebooting again, and then restoring a previous configuration. Now I'm defragging it, virus checking it, removing spyware, removing 'helper' applications... all that fun stuff. 'As easy as Windows XP' - what was I thinking?!