Qt World Summit: Register Today!

Disable fonts for UI Designer

  • Hi,

    is there a way to make the qt designers property editor allow only certain fonts? At the moment each font from /usr/lib/fonts and below is selectable, but because I am developing for an embedded linux I want to allow only those fonts available on the target system. Can I change the fontdir for the qt creator or is it bound to the OS's fontdir?
    I am using Qt Creator 2.2.1 and Ubuntu 8.0.4.

    thanks in anticipation

  • Good question. I have the same problem. So I hope someone can answer!

  • I don't think it can be done, and I also don't see it being added any time soon. Can't you just restrict yourself to these limits?

  • The problem behind that is that we provide a plc controller with a HMI (linux embedded). For the HMI we use Qt, of course. So we provide a virtual machine with the cross compiler, Qt Creator and so on. On the target are only a few fonts installed. If the costumer use a font which is not installed on the target you can get a strange looking UI.

    For that scenario it would be very helpful to show only the target fonts in the Qt Creator.

    I hope this helps to understand, why this would be a good thing.

  • I understand the use case, but I think it is so specific that it will probably not be added to Qt Designer. However, nobody is stopping you from patching it yourself, and providing your patched version to your customer. Note that there are also other who provide their own versions of Qt Creator, like KDAB.

  • You are right. That's why I already have written some plugin for the Qt Creator.
    But I want just extend/add some features but not change the Qt Creator it self.

    But may be I have to take look at this in the Qt Creator sources.

Log in to reply