Linux下安装eclipse做Qt的IDE

一:前置条件:

1.      安装QT

二、安装Eclipse

1.        下载所需软件:

                  

2.        将三个文件共享到虚拟机的Linux系统中,(虚拟机和主机之间的共享通信可以使用samba。)我这里是将其拷贝到/home/windeal/MyDocument/EclipseForQt目录下,其中windeal是我的用户名。

3.        将eclipse-cpp-juno-SR2-linux-gtk.tar.gz拷贝到/opt目录下(个人习惯原因,我放在了其子目录EclipseForQt目录下)

windeal@ubuntu:EclipseForQt$ sudo cpeclipse-cpp-juno-SR2-linux-gtk.tar.gz /opt/EclipseForQt/

 

4.         

sudo tar zvxf eclipse-cpp-juno-SR2-linux-gtk.tar.gz

解压完成后生成了一个eclipse目录


进入该目录运行./eclipse

 

 

 

此时提示JRE没有安装:


5.        安装JRE:

将前面的文件jre.bin复制到我们刚刚的文件夹/opt/(我的是/opt/EclipseForQt)中。


运行jre.bin    (./jre.bin)


此时当前目录出现jre1.6.0_32目录


移动jre1.6.0_32到eclipse目录下


        移动后    


重命名jre1.6.0_32为jre


6.        运行:./eclipse


7.        设置工作空间,然后点击


可以选择添加工程和导入工程,这时候还没有提示添加qt项目,原因是还没有安装qt插件,关闭eclipse这时候需要安装qt插件

 

三、安装Qt插件

1.        同样的,把前面的qt-eclipse-integration-linux.x86-1.6.1.tar.gz拷贝到我们/opt/文件夹中


2.        解压


3.        用ls查看下当前文件夹发现没有产生新的文件,因为该插件解压后并入了eclipse目录中

4.        运行./eclipse


在选择Windows菜单,进入preference,可以看到Qt项目了

选择QT,点击ADD。

5.        选择你的Qt安装目录


Finish->Apply->Ok

6.        环境搭建完成了。

7.        这时候可以导入QT工程根据录屏老师演示的导入工程的方法来:File->new->other 然后添加QT工程


8.        大功告成

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
为了设计一个漂亮的Android为了设计一个漂亮的Android Studio App“我的”页面,你可以考虑以下几个步骤: Studio App“我的”页面,你可以考虑以下几个方面: 1.设计页面布局:你可以使用LinearLayout、RelativeLayout或Constraint1.页面布局:你可以使用LinearLayout、RelativeLayout或者ConstraintLayout等布局来设计你的页面。你需要考虑页面中包含哪些元素,例如头像、用户名、个人信息、设置选项等,Layout等布局方式来设计你的页面。在布局中,你需要考虑页面元素的大小、位置和排列方式,以及不同元素之间的间距和对齐方式并将它们放置在合适的位置。 2.添加控件:你可以使用TextView、ImageView、Button等控件来添加页面。 2.页面元素:你可以在页面中添加各种元素,例如TextView、ImageView、Button等。元素。例如,你可以使用ImageView来添加头像,使用TextView来添加用户名和个人信息,使用Button来添加设置你需要考虑元素的大小、颜色、字体、图标等,以及它们之间的排列方式和交互方式。 3.页面样式:你可以使用不同的样式来设计选项等。 3.设置控件属性:你可以设置控件的属性来改变它们的外观和行为。例如,你可以设置TextView的字体、你的页面,例如Material Design、Flat Design等。你需要考虑页面的整体风格和色彩搭配,颜色和大小,设置ImageView的大小和形状,设置Button的背景颜色和点击事件等。 4.添加交互功能:你可以使用Java代码来添加交互功能。例如,你可以使用setOnClickListener()方法来为Button添加点击事件,以及不同元素之间的协调性和一致性。 4.页面功能:你可以在页面中添加各种功能,例如个人信息、设置、消息通知等。使用setText()方法来改变TextView的文本内容,使用setBackgroundColor()方法来改变LinearLayout你需要考虑功能的实用性和易用性,以及它们之间的逻辑关系和交互方式。 下面是一个简单的Android Studio App的背景颜色等。 下面是一个简单的示例代码,它演示了如何使用LinearLayout、TextView和Button来设计“我的”页面设计示例,你可以参考一下: ```xml一个“我的”页面,并为Button添加了点击事件: ```java //<LinearLayout 在 Activity android中:添加以下layout代码_width ="LinearLayoutmatch_parent layout =" findViewById android(R:.id.mylayout_height_layout); ="TextViewmatch name_parent" androidView = findViewById:(R.idorientation.name="vertical_view); "> Button settingButton <ImageView = findViewById android(R:.idlayout.setting_button_width); //=" 设置100dp" TextView 的文 android:本内容layout_height name="View100.setTextdp("" John Smith android:"); src="@drawable///avatar " 为Button android添加:点击事件layout_gravity setting="Buttoncenter.setOnClickListener(new View.OnClickListener_horizontal()" { android @:Overridelayout _margin Top=" public50 voiddp onClick(View"/> v ) { <TextView // android 处:理layout点击_width="事件 wrap_content Toast" .makeText(getApplicationContext android:(), "layoutSetting_height clicked="wrap",_content Toast.LENGTH_SHORT" ).show android:text(); ="用户名 " } }); android:textSize```="20sp" android:textColor="#000000" android:layout_gravity="center_horizontal" android:layout_marginTop="20dp"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="个人信息" android:textSize="16sp" android:textColor="#FFFFFF" android:background="#FF04EDC9" android:layout_marginTop="50dp"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="设置" android:textSize="16sp" android:textColor="#FFFFFF" android:background="#FF04EDC9" android:layout_marginTop="20dp"/> <Button android:layout_width="match_parent" android:layout_height="wrap_content" android:text="消息通知" android:textSize="16sp" android:textColor="#FFFFFF" android:background="#FF04EDC9" android:layout_marginTop="20dp"/> </LinearLayout> ```

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值