导航:首页 > 文件类型 > linuxqt配置文件

linuxqt配置文件

发布时间:2023-03-03 23:23:20

⑴ 如何在linux系统下使用qt

不知来您使用的是哪个源Linux,Ubuntu(Den类)中的最为容易,可以在软件中心直接下载,然后在终端输入
$sudo apt-get install qdevelop
之后就可以在Qt上进行软件开发了
如果在Fedora中(Redhat类),首先要查一下Qt软件依赖的文件,先将依赖的软件包安装后即可安装Qt

可以参考这本书
C++ GUI Programing with Qt4 (2nd edition)
中文名叫
C++ GUI Qt4程序设计

⑵ Linux/QT 如何设置Qt应用程序图标

Icon”就可以看到在各种平台设置Qt程序图标的方法。 the Application Icon on Windows First, create an ICO format bitmap file that contains the icon image. This can be done with e.g. Microsoft Visual C++: Select File|New, then select the File tab in the dialog that appears, and choose Icon. (Note that you do not need to load your application into Visual C++; here we are only using the icon editor.) Store the ICO file in your application’s source code directory, for example, with the name myappico.ico. Then, create a text file called, say, myapp.rc in which you put a single line of text:IDI_ICON1ICON DISCARDABLE "myappico.ico"Finally, assuming you are using qmake to generate your makefiles, add this line to your myapp.pro file: RC_FILE = myapp.rcRegenerate your makefile and your application. The .exe file will now be represented with your icon inExplorer. If you do not use qmake, the necessary steps are: first, run the rc program on the .rc file, then link your application with the resulting .res file. 操作如下:首先准备个ICO图标。例如:myappico.ico 用记事本新建个文件,里面就写一行: IDI_ICON1 ICON DISCARDABLE “myappico.ico” 保存改名为 myapp.rc并把它和你的图标myappico.ico一起复制到你的QT工程项目的目录。 用记事本打开你的QT工程文件(如 “myapp.pro” ),在里面最后新添一行 保存,编译你的工程,成功了吧。

⑶ 在linux 如何安装qt 4.8.1

tar zxvf qt-everywhere-opensource-src-4.8.4.tar.gz
进入解压后文件目录,执行配置
root@emouse:~/study# cd qt-everywhere-opensource-src-4.8.4/
root@emouse:~/study/qt-everywhere-opensource-src-4.8.4# ./configure
修改配置文件
if [ -z "$QT_INSTALL_PREFIX" ]; then
if [ "$CFG_DEV" = "yes" ]; then
QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
elif [ "$PLATFORM_QWS" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then
if [ "$PLATFORM_QPA" = "yes" ]; then
QT_INSTALL_PREFIX="/usr/local/Trolltech/QtLighthouse-${QT_VERSION}"
else
QT_INSTALL_PREFIX="/usr/local/Trolltech/QtEmbedded-${QT_VERSION}"
fi
if [ "$PLATFORM" != "$XPLATFORM" ]; then
QT_INSTALL_PREFIX="${QT_INSTALL_PREFIX}-${CFG_ARCH}"
fi
elif [ -d "$EPOCROOT" ] && [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
if [ "$XPLATFORM_SYMBIAN" = "yes" ]; then
QT_INSTALL_PREFIX="$EPOCROOT/epoc32/"
QT_INSTALL_LIBS="$EPOCROOT/epoc32/release/armv5/lib/"
fi
else
QT_INSTALL_PREFIX="/usr/local/Trolltech/Qt-${QT_VERSION}"
ok
启动
/usr/local/Trolltech/Qt-4.8.4/bin/designer

⑷ linux下qtcreator怎么配置c++的编译器

编译器:GCC编译器可以用来编译C和C++源程序,C编译器通过文件的后缀来判断是C程序还是C++程序。一般来说C源文件的后缀为“.C”,而C++源文件的后缀为“.C”或“C++”。
但GCC编译器只能编译C++源程序,不能与使用的库连接,因此用G++来完成C++程序的编译与连接,该程序会自动调用GCC来编译。


Linux里环境变量的设置,有如下几种方法:


(1)直接在终端里输入export后面加要设的变量,例如QT:
ExportQTDIR=$PWD/qt-2.3.2
其中,pwd是用来显当前路径的命令,在其前面加上$,则表示QT的目标目录在当前目录下的“qt-2.3.2”里,当然“$PWD”也可以用绝对路径来代替。这种方法所设的环境变量在下次开机后不再有效,而且换个shell也不会有效,只是临时的。
(2)在etc/profile里添加环境变量,比如:
exportQTDIR=/usr
exportLD_LIBRARY_PATH=$QTDIR/lib
exportQT_QWS_FONTDIR=$QTDIR/lib/fonts
exportQWS_DISPLAY="LinuxFb:/dev/fb0"
(3)修改.bashrc,如果需要给某个用户权限使用这些环境变量,只需修改其个人用户家目录下的.bashrc文件就可以了。
(4)用以上面两种方法设置好环境变量后记得重启


以上使用QT为例

⑸ 在linux用qt编译的程序如何移植到window下进行演示

很简单,打包工程项目,移动到Windows平台下,然后删除Linux平台配置文件,再编译即可通过了。至于平台配置文件是那一个我就不说了,自己找找吧,不是cpp,不是h,不是ui,不是资源文件,而且一个很明显的平台编译配置文件。

⑹ linux 怎样搭建qtwebkit使用的gstreamer

1. 编译libxml2

下载libxml2-sources-2.7.6.tar.gz

解包后在当前目录下编写如下编译脚本:(当然,不用脚本也行,你可以直接执行)】

CC=arm-none-linux-gnueabi-gcc./configure--build=i686-linux--host=arm-none-linux--prefix=/home/work/dist--without-python
make&&makeinstall

2. 编译zlib, 这个太common,我不啰嗦了, glib-2.0要依赖的。

3. 编译glib-2.0

下载glib-2.24.2.tar.bz2, 解包, 这个版本的依赖库很少, 竟然只需要zlib。

老版本需要的libconv, gettext等均不需要了。

同样, 编写编译脚本:

CC=arm-none-linux-gnueabi-gcc./configure--build=i686-linux--host=arm-none-linux
--prefix=/home/work/dist
CFLAGS="-I/home/work/dist/include-L/home/work/dist/lib"
glib_cv_stack_grows=noglib_cv_uscore=noac_cv_func_posix_getpwuid_r=yes
ac_cv_func_posix_getgrgid_r=yesac_cv_lib_rt_clock_gettime=noglib_cv_monotonic_clock=yes
make&&makeinstall

4. 编译gstreamer

下载gstreamer-0.10.35.tar.gz, 这个是0.10版本里面最新的了。

编译脚本:

CC=arm-none-linux-gnueabi-gccPKG_CONFIG_PATH=/home/work/dist/lib/pkgconfig./configure--build=i686-linux--host=arm-none-linux
--prefix=/home/work/distCFLAGS=-I/home/work/dist/include--disable-registry--disable-loadsave--disable-gtk-doc
ac_cv_func_register_printf_function=no--disable-tests--disable-valgrind--disable-debug--disable-gst-debug

make&&makeinstall

5. 编译gst plugins base

下载gst-plugins-base-0.10.35.tar.gz。

编译脚本:

CC=arm-none-linux-gnueabi-gccPKG_CONFIG_PATH=/home/work/dist/lib/pkgconfig./configure--build=i686-linux--host=arm-none-linux
--prefix=/home/work/distCFLAGS=-I/home/work/dist/include--disable-valgrind--disable-x--disable-gnome_vfs--disable-alsa--disable-ogg--disable-pango--disable-theora--disable-vorbis--disable-examples

make&&makeinstall


接下来开始编译Qt

Qt的配置文件很复杂, 我就不写出来了, 就是要注意这三点:

1. 在Qt 的configure 时加上-force-pkg-config, 否则会在WebCore的feature.pri中检查时报"Disabling video e the lack of GLib/Gio/GStreamer.",

也就是说会不支持video.

具体可以看这个pri片段:

!contains(QT_CONFIG,no-pkg-config):system(pkg-config--existsglib-2.0gio-2.0gstreamer-0.10):{
DEFINES-=ENABLE_VIDEO=0
DEFINES+=ENABLE_VIDEO=1
DEFINES+=WTF_USE_GSTREAMER=1
DEFINES-=WTF_USE_GSTREAMER=0
}else{
message("DisablingvideoethelackofGLib/Gio/GStreamer.")
DEFINES-=ENABLE_VIDEO=1
DEFINES+=ENABLE_VIDEO=0
}


如果不指定-force-pkg-config, 就会被当作no-pkg-config.

2. 为configure指定:PKG_CONFIG_PATH=/home/work/dist/lib/pkgconfig, 否则也会diabling video

3. 为了让webkit库能找到gstreamer等库, 还需要在webkit.pro中加上

阅读全文

与linuxqt配置文件相关的资料

热点内容
dbf文件c语言处理excel 浏览:138
金蝶kis支持win10吗 浏览:113
常州采集物联网大数据平台有哪些 浏览:950
win10休眠文件改到d盘 浏览:626
如何编程手机app软件 浏览:656
node获取文件名 浏览:367
iphoneios7怎么设置铃声 浏览:52
手机qq激活星钻 浏览:302
html中引入js文件路径 浏览:83
0基础自学编程可以看什么书 浏览:860
javapoi导出excel 浏览:212
迷你编程迷小酷为什么邮箱里没有 浏览:33
ipadqq接收的文件在哪里 浏览:15
拼多多初级看哪些数据 浏览:848
win10开机密码屏幕键盘 浏览:162
文件夹乐高 浏览:914
外置文件夹挂载 浏览:304
人人视频本地缓存文件 浏览:194
java俄罗斯方块项目描述 浏览:354
win10系统被冻结 浏览:460

友情链接