丑陋的Qt应用程序看起来在Ubuntu下 [英] ugly Qt app look under ubuntu

查看:187
本文介绍了丑陋的Qt应用程序看起来在Ubuntu下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Linux下开发一些Qt应用程序。我已经下载了源代码并首先在Windows 7下进行了编译,但后来我决定在Ubuntu下工作。问题是,Linux中的应用程序看起来像Win95时代。我已经安装了Qt4设置并选择了GTK +风格,但是这只改善了外观,尽管它看起来仍然非常难看(比如256 collors pallette,字体是斜体)。我也安装了许多gtk库,但没有任何帮助。我使用Qt-4.7.4。我知道它应该看起来不一样,因为在Windows上这个问题并没有出现,即使在我老板的电脑上,他也在使用Ubuntu,应用程序看起来好多了。



该应用程序将样式更改为QPlasticStyle本身。



预先感谢您的每一个答案。




好吧,还有很多尝试,但没有任何改变。也许我会告诉你这个问题。应用程序应该如何(或多或少)(由我的一个公司制作):
http://postimage.org/image/70p6sw7xd/full/



以及它的实际外观(由我制作):
http://postimage.org/image/48psktnuj/full/



到目前为止我还没有做过两件事:

1)在开始时,我安装了Qt-4.8.1,但它产生了一些使用 make 的OpenGL错误,于是我下载了4.7.4版本(我的老板和工程师正在使用的版本)并且在安装过程中苦苦挣扎。最后,我刚刚用4.7.4中的4.8.1覆盖了qt-make,并且它编译得很好。但后来我遇到了'问题'。重点 - 所有的Qt应用程序都告诉(帮助 - >关于Qt)他们正在使用Qt-4.8.1,我想知道它是否与问题有关。



2)第二件事是我的图形。我有搭载Nvidia Optimus的MSI CX640笔记本。安装Ubuntu之后,我不得不使用集成的英特尔HD3000而不是专用的GT520M(这使得风扇行为毫无必要)。我已经搜索了这个方法,并且实际上成功地禁用了GT520M。它的重点是什么 - 我不确定,但是我记得在我搜索解决方案的网站上提到了一些OpenGL的东西)。我认为这与问题没有任何共同之处,但我很沮丧,现在我正在洞察一切。

也许这些可以更好地概述问题。


PS。感谢您的努力,我欣赏他们。

>

但是,我已经正确地重新安装了Qt 4.7.4,如果在它上面构建,应用程序看起来不错,尽管它的字体很像Monotype而不是Ubuntu的。
不幸的是,这是Qt问题,难以弥补。也许你现在该怎么做?
我正在解决我的问题的最后一部分。



编辑:万岁!解决了!
我用4.8.1与我的项目进行了堆叠,使用
http://qt-project.org/forums/viewthread/14269/#74232

http://ubuntuforums.org/showthread.php?t=1559654



感谢所有人。


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.

解决方案

Well, few days have passed and I'm still struggling.

But, I have reinstalled properly Qt 4.7.4 and, if build on it, the application looks good, despite of font, which is like Monotype instead of Ubuntu's one. Unfortunately, this is Qt issue and is hard to compensate it. Maybe you now how to do that? I'm on the last part of way to solve my problem.

EDIT: Hurray! Solved! I stacked with 4.8.1 made compatible with my project with use of http://qt-project.org/forums/viewthread/14269/#74232 and http://ubuntuforums.org/showthread.php?t=1559654

Thanks everyone.

这篇关于丑陋的Qt应用程序看起来在Ubuntu下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆