Messed up UI under Ubuntu



  • When running my application under Ubuntu, the UI gets messed up.
    This is a simple form with some labels on it in English and Greek.
    Inside creator, everything appears ok, when I change the fonts and when I preview the form in various styles.

    To start with, it is not using the fonts that I select in the designer (I tried at first with the default Ubuntu font, which has support for Greek).

    More alarmingly though, the Greek is displayed garbled, and you cannot enter any greek text in the line edits.

    I tried setting the locale on the form, but that didn't help.
    What could I be doing wrong?

    thanks.



  • Try to create a small test program, so others can reproduce it.



  • I don't understand what you want me to put in this program.
    If you create a default application and add any label, button or menu with Greek in it (try the word "Ελληνικά") it doesn't display properly at runtime.
    I wish I could post some images here, because it would be much easier to see what I'm talking about (although it can be reproduced in a few seconds).

    If there is anything specific this test program should have, please let me know.



  • What you can do for posting images, is put them in the public folder of your dropbox, and use the link as the image source (button between the numbered list and the link in the editor area). That's how I put up images on this page.



  • which dropbox? is there one associated with my account here? (because I can't find it)



  • I think Andre means: your favourite upload method. For instance I'm using github and I can link any file on my git folders there directly from this forum.



  • "Use this website ":http://imageshack.us/



  • [quote author="harry" date="1302854069"]which dropbox? is there one associated with my account here? (because I can't find it)[/quote]

    I was talking about this "dropbox":http://www.dropbox.com (but if you don't mind, please use this "referal link":http://db.tt/6e0tCnJ instead to create an account if you want one), but any of the other external sites that allow you to host images work (just) as well.



  • Well I put the in my mobileme public folder if someone would like to look at them
    https://public.me.com/hsfougaris



  • Does the font you use in that dialog even have the Greek characterset?



  • Well if you look at the screenshots, you can see that it does.
    Even if I select a different one, that again has Greek, the result at runtime is different.

    And of course in other apps (evolution for example which uses the same font) all is good.



  • I did look at the screenshots, and noticed that the font at runtime is different from the font at design time. That's why I asked.



  • So what could I be doing wrong here?
    I'm selecting a font with the designer, and I can see the change applied there.
    I save/clean/rebuild my project, but I get something different.
    Does it have to do with styles? I tried setting styles (with qApp->setStyle(....) like cleanlooks), but they don't seem to affect the fonts.



  • Another thing is that these exact steps, work fine under Mac and Windows.
    I'm not setting up any font in particular on my form so under Linux it uses the font 'Ubuntu', under Mac 'Lucida Grand' and under windows 'Segoe'.



  • I even changed the default system locale to Greek (and everything I see is now in Greek), but the app still refuses to display properly at runtime.

    This is really baffling, and I don't know how to troubleshoot.
    It doesn't look like it's a system issue (as everything else is working correctly - even QtCreator).



  • I also test this:
    i created a console app that displays a single string.
    By default it displays garbage.

    I added
    @
    QString c = "UTF-8";
    QTextCodec::setCodecForTr(QTextCodec::codecForName(c.toLatin1()));
    QTextCodec::setCodecForCStrings(QTextCodec::codecForName(c.toLatin1()));
    QTextCodec::setCodecForLocale(QTextCodec::codecForName(c.toLatin1()));
    @
    and then it works.

    I am using the same in my GUI app, but the form is still messed up.

    Since I'm not really tied to Ubuntu and no-one seems to use it, can someone that is willing to try this on their distribution tell me what distro they have, so I may try with that? thanks.



  • Never mind.... I downloaded Fedora and it works like a charm.
    I don't know what on earth is wrong with Ubuntu, and I don't care ( I was doing a test build anyway ).
    Strange though - I did the exact same things...



  • Nice solution. I have problems with Windows, downloaded Fedora...and "it works like a charm" :)



  • What do you mean?



  • I mean that Fedora makes the problems disappear no matter what was your operating system or the problem you had.



  • yes but I don't understand the reference to Windows...



  • I'm really interested in your answer, since I haven't used linux much recently.
    Was your comment ironic or serious? Does Fedora in general generate less grief than other distros for developers?
    Because considering how basic (and serious) at the same time my problem with Ubuntu was, and the fact no-one could offer any suggestions, means for me that most likely no developer (that hangs around here) is using Ubuntu.
    Thankfully I was only looking to do a test compile of my app, and I can control the environment under my app will be used (which doesn't look like it's going to be Ubuntu), but this case should interest someone I think...



  • I was totally serious.

    I had some problems with Qt - I "couldn't install the SDK on Windows properly":http://developer.qt.nokia.com/forums/viewthread/5092/ ( if you are interested, see the last but one comment in this thread ) . One of the solutions I've found was to use Fedora instead of Windows. I haven't been using Linux regularly for a long time ... but this experience made me reconsider this. Now I'm migrating towards using Fedora for everyday usage ( and Windows as a virtual machine if needed ).

    I don't have enough experience to say that Fedora is better ... but I like it and I hope it won't have any serious problems.



  • I'm starting to appreciate Fedora too.
    Everything Qt related seems to work out of the box.
    I even managed to build the postgresql driver (64 bit) easily (I had a similar post with my troubles building it under Windows x64).


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.