Use Qt in Debian for OpenCASCADE

Use Qt in Debian for OpenCASCADE

eryar@163.com

Recently several OpenCASCADE enthusiasts want to build my simple Qt demo about OpenCASCADE on ubuntu system, but could not compile it successfully. Because I only compiled the occQt in Windows system, do not try it in Linux system. I try to build it on Debian system, also have the same errors as follows:

Figure 1. Compile errors of Building occQt on Debian

In order to use Qt5 in Debian7, you can input the following commands:

1. Get Qt5 on Debian:

sudo apt-get install qt5-default qt5-qmake qtbase5-dev-tools qtchooser

2. Download the newest version of QtCreator from Qt website:

http://www.qt.io/download-open-source/#section-6

You can get the following file:

qt-creator-opensource-linux-x86_64-3.4.0.run

Figure 2. Download Qt Creator for Linux

3. Install QtCreator manually:

Install Qt Creator manually by the following commands:

chmod u+x ./qt-creator-opensource-linux-x86_64-3.4.0.run

./qt-creator-opensource-linux-x86_64-3.4.0.run

Figure 3. Qt Creator Setup

Figure 4. Qt Creator Setup

4. It is succeed When the Qt Creator Icon appears in the Applications.

Figure 5. Qt Creator in Applications

5. I tried the math_Vector, it runs correctly, the code list as follows:

#include <math_Vector.hxx>

void TestVector(void)
{
    math_Vector aVector(1, 3);

    aVector.Init(1.0);
    aVector.Dump(std::cout);

    aVector = -aVector;
    aVector.Dump(std::cout);

    aVector = aVector.Opposite();
    aVector.Dump(std::cout);

}

int main()
{
    TestVector();

    return 0;
}

The configuration of the test project as follows:

TEMPLATE = app

CONFIG += console

CONFIG -= app_bundle

CONFIG -= qt

SOURCES += main.cpp

include(deployment.pri)

qtcAddDeployment()

INCLUDEPATH += /home/eryar/opencascade-6.8.0/inc

DEPENDPATH += /home/eryar/opencascade-6.8.0

LIBS += -L/home/eryar/opencascade-6.8.0/lib/ -lTKernel -lTKMath

The result shows:

Figure 6. Test math_Vector in Qt on Debian

It can compile and run correctly, the compile error in occQt do not appear in the test program. you can also debug the code in Qt Creator. So use Qt Creator to program on Linux is very convenient.

PDF Version: Use Qt in Debian for OpenCASCADE

时间: 2024-11-23 12:36:14

Use Qt in Debian for OpenCASCADE的相关文章

A Simple OpenCASCADE Qt Demo-occQt

A Simple OpenCASCADE Qt Demo-occQt eryar@163.com Abstract. OpenCASCADE have provided the Qt samples in the samples directory, but they are a little complicated. So I decide write a simple OpenCASCADE Qt demo for the OpenCASCADE beginners.  Key Words.

Qt with OpenCascade

Qt with OpenCascade eryar@163.com 摘要Abstract:详细介绍了如何在Qt中使用OpenCascade. 关键字Key Words:Qt.OpenCascade 一.引言 Introduction 1.1 Overview of Qt Qt是1991年奇趣科技开发的一个跨平台的C++图形用户界面应用程序框架.它提供给应用程序开发者建立艺术级的图形用户界面所需的所有功能.Qt很容易扩展,并且允许真正地组件编程.基本上,Qt同X Window上的Motif,Ope

Try to use Debian

Try to use Debian eryar@163.com Debian是OpenCASCADE用于Linux操作系统测试的专用系统.这几天下载安装了Debian系统,体验了一下,感觉还不错:简洁,精致. Figure 1. Debian GUI Figure 2. Debian GUI 安装Debian也并不是一帆风顺,和刚开始自己安装Windows操作系统一样,也遇到了些小问题.不过把这些都解决后,Debian用起来感觉很对味. v 显卡驱动 首先遇到是显卡驱动没有正确安装.由于笔记本是

Building OpenCASCADE on Debian

Building OpenCASCADE on Debian eryar@163.com Abstract. When you are familiar with OpenCASCADE on Windows, you should try it on Linux operating system, because of Debian is also open source like OpenCASCADE. The paper is focus on how to building the O

debian qt-Debian 下运行Qt assistant等程序,这些程序的中文菜单显示为方框

问题描述 Debian 下运行Qt assistant等程序,这些程序的中文菜单显示为方框 Debian 下编译.安装Qt4.8.3后,运行Qt assistant等程序,这些程序的中文菜单显示为方框,是什么原因呢?望大神不吝赐教,谢谢!(我工作在Debian中文环境下,其他程序都能正常显示中文菜单,没有问题,如Debian自带的一些办公软件)

OpenCascade 6.7.1 and Qt 5

OpenCascade 6.7.1 and Qt 5 eryar@163.com   Keywords: OpenCascade 6.7.1, Qt5, Demo   从OpenCascade6.7.0开始图形显示的初始化部分有较大改动,将原来给出的一个关于Qt的最简单的例子程序升级到最新版本: Qt with OpenCascade: http://www.cppblog.com/eryar/archive/2013/08/18/202617.html   Qt的版本还是原来的,OpenCas

OpenCASCADE Outline

OpenCASCADE Outline eryar@163.com      有网友反映blog中关于OpenCASCADE的文章比较杂乱,不太好找,最好能提供一个大纲,这样方便查找.于是决定将这些学习时写的文章整理下,方便对OpenCASCADE的学习理解.其实在http://www.cnblogs.com/opencascade中,已经将文章按目录重新发表了一遍.可以按OpenCASCADE的模块的顺序来学习,也可以挑选自己感兴趣的部分来学习.      由于本人水平所限,文中的错误不妥之处

FreeType in OpenCASCADE

FreeType in OpenCASCADE eryar@163.com Abstract. FreeType is required for text display in the 3D viewer. FreeType is a software font engine that is designed to be small, efficient, highly customizable, and portable while capable of producing high-qual

Undo/Redo for Qt Tree Model

Undo/Redo for Qt Tree Model eryar@163.com Abstract. Qt contains a set of item view classes that use a model/view architecture to manage the relationship between data and the way it is presented to the user. The separation of functionality introduced