I'm involed in developing some Qt application build under Linux. I have downloaded the source code and compiled it under Windows 7 firstly, but then I decided to work under Ubuntu. The problem is, the application in Linux looks like in Win95 times. I have installed Qt4 Settings and chosen GTK+ style, but this improved the look only a little bit, though it still looks very ugly (like 256 collors pallette, font is italic). I have also installed many gtk libraries, but nothing helped. I use Qt-4.7.4. I know that it should look different, beacuse on Windows the problem doesn't appear, even on my boss' computer, who is also using Ubuntu, the application looks much better.
The app changes style to QPlasticStyle itself.
Thanks in advance for every answer.
Well, another lot of tries, but nothing changed. Maybe I will show you the problem. How the app should look like (more or less) (ss made by one of my co): http://postimage.org/image/70p6sw7xd/full/
and how it actually looks like (ss made by me): http://postimage.org/image/48psktnuj/full/
There are two things that I haven't done so far:
1) At the beginning, I installed Qt-4.8.1, but it was generating some OpenGL errors with make so I then downloaded 4.7.4 version (the one that my boss and cos are using) and was strugling with installation. Finally, I just overwrote qt-make from 4.8.1 with the one from 4.7.4 and it compiled fine. But then I encountered the 'Question thing'. The point - all Qt applications tells (Help-> About Qt) that they are using Qt-4.8.1 and I wonder if it has some connection with the problem.
2) Second thing is my graphics. I have MSI CX640 notebook with Nvidia Optimus on board. After installing Ubuntu I had to make it using the integrated Intel HD3000 instead of the dedicated GT520M (it was making the fan behave noisely unnecessary). I have googled for the way to do so and actually succeded in disabling GT520M. What is the point of it - I'm not sure, but I remember some OpenGL things were mentioned on sites where I was searching for the solution). I think this has nothing in common with the problem, but I'm so frustraded tha now I'm insighting everything.
Maybe these can give better overview of the problem.
PS. Thanks for your attemps, I appreciate them.
Try installing the qt4-qtconfig package. Use the qtconfig tool to customize the look n' feel.
sudo apt-get install qt4-qtconfig
qtconfig &
Edit:
If it looks really bad, try deleting (or temporarily rename) the ~/.config/Trolltech.conf file. Then use Qt4 Settings to start again. Also, I'd suggest you to try installing the Oxygen and QtCurve styles.
FIRST PROPOSED APPROACH
Have you tried to change manually the style of the application by command line? Go to the application folder, where you have the compiled version of the program, and execute it by appending -style cleanlooks or any other of the predefined styles (windows, motif, cde, plastique, cleanlooks or gtk+). If the program is named foo, then you must write:
foo -style gtk+
Compare the appearance with your boss' computer. This will indicate if the problem is with the styles or with the selection of the predefined style in Qt.
ANOTHER POSSIBLE APPROACH
Knowing that you have overwritten a previous installation, maybe some library file has been corrupted or lost or not overwritten by Qt4.7.4.
If that's the case, you would discover which files have gotten corrupted or misleading by executing a diff on some directories, between your boss' computer and yours.
The Qt libraries are normally at /usr/lib/i386-linux-gnu/ (there's where live the predefined styles, precompiled) and the filenames are in the form libQt...
You could verify the path of the libraries if you examine a Makefile of some of your projects and search for the -L switch. Maybe yours are in another folder, like /usr/lib directly.
So, you could make the list of libraries and their names and sizes with:
ls -l /usr/lib/i386-linux-gnu/libQt*
If you see some links pointing at the wrong place, or version numbers scrambled, then you have found the problem. If not, then compare the list with another one from your boss (problably the file sizes may indicate a remnant of Qt4.8).
I don't know if you can replace the library files from one computer to the other. Try. The least could happen is that you have to reinstall Qt.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With