INSTALLATION INSTRUCTIONS
These instructions refer to the package you are installing as
some-package.tar.gz or some-package.zip. The .zip file is intended for use
on Windows.
The directory you choose for the installation will be referred to as
your-install-dir.
Note to Qt Visual Studio Integration users: In the instructions below,
instead of building from command line with nmake, you can use the menu
command 'Qt->Open Solution from .pro file' on the .pro files in the
example and plugin directories, and then build from within Visual
Studio.
Unpacking and installation
--------------------------
1. Unpacking the archive (if you have not done so already).
On Unix and Mac OS X (in a terminal window):
cd your-install-dir
gunzip some-package.tar.gz
tar xvf some-package.tar
This creates the subdirectory some-package containing the files.
On Windows:
Unpack the .zip archive by right-clicking it in explorer and
choosing "Extract All...". If your version of Windows does not
have zip support, you can use the infozip tools available
from www.info-zip.org.
If you are using the infozip tools (in a command prompt window):
cd your-install-dir
unzip some-package.zip
2. Configuring the package.
The configure script is called "configure" on unix/mac and
"configure.bat" on Windows. It should be run from a command line
after cd'ing to the package directory.
You can choose whether you want to use the component by including
its source code directly into your project, or build the component
as a dynamic shared library (DLL) that is loaded into the
application at run-time. The latter may be preferable for
technical or licensing (LGPL) reasons. If you want to build a DLL,
run the configure script with the argument "-library". Also see
the note about usage below.
(Components that are Qt plugins, e.g. styles and image formats,
are by default built as a plugin DLL.)
The configure script will prompt you in some cases for further
information. Answer these questions and carefully read the license text
before accepting the license conditions. The package cannot be used if
you do not accept the license conditions.
3. Building the component and examples (when required).
If a DLL is to be built, or if you would like to build the
examples, next give the commands
qmake
make [or nmake if your are using Microsoft Visual C++]
The example program(s) can be found in the directory called
"examples" or "example".
Components that are Qt plugins, e.g. styles and image formats, are
ready to be used as soon as they are built, so the rest of this
installation instruction can be skipped.
4. Building the Qt Designer plugin (optional).
Some of the widget components are provided with plugins for Qt
Designer. To build and install the plugin, cd into the
some-package/plugin directory and give the commands
qmake
make [or nmake if your are using Microsoft Visual C++]
Restart Qt Designer to make it load the new widget plugin.
Note: If you are using the built-in Qt Designer from the Qt Visual
Studio Integration, you will need to manually copy the plugin DLL
file, i.e. copy
%QTDIR%\plugins\designer\some-component.dll
to the Qt Visual Studio Integration plugin path, typically:
C:\Program Files\Trolltech\Qt VS Integration\plugins
Note: If you for some reason are using a Qt Designer that is built
in debug mode, you will need to build the plugin in debug mode
also. Edit the file plugin.pro in the plugin directory, changing
'release' to 'debug' in the CONFIG line, before running qmake.
Solutions components are intended to be used directly from the package
directory during development, so there is no 'make install' procedure.
Using a component in your project
---------------------------------
To use this component in your project, add the following line to the
project's .pro file (or do the equivalent in your IDE):
include(your-install-dir/some-package/src/some-package.pri)
This adds the package's sources and headers to the SOURCES and HEADERS
project variables respectively (or, if the component has been
configured as a DLL, it adds that library to the LIBS variable), and
updates INCLUDEPATH to contain the package's src
directory. Additionally, the .pri file may include some dependencies
needed by the package.
To include a header file from the package in your sources, you can now
simply use:
#include <SomeClass>
or alternatively, in pre-Qt 4 style:
#include <some-class.h>
Refer to the documentation to see the classes and headers this
components provides.
Install documentation (optional)
--------------------------------
The HTML documentation for the package's classes is located in the
your-install-dir/some-package/doc/html/index.html. You can open this
file and read the documentation with any web browser.
To install the documentation into Qt Assistant (for Qt version 4.4 and
later):
1. In Assistant, open the Edit->Preferences dialog and choose the
Documentation tab. Click the Add... button and select the file
your-install-dir/some-package/doc/html/some-package.qch
For Qt versions prior to 4.4, do instead the following:
1. The directory your-install-dir/some-package/doc/html contains a
file called some-package.dcf. Execute the following commands in a
shell, command prompt or terminal window:
cd your-install-dir/some-package/doc/html/
assistant -addContentFile some-package.dcf
The next time you start Qt Assistant, you can access the package's
documentation.
Removing the documentation from assistant
-----------------------------------------
If you have installed the documentation into Qt Assistant, and want to uninstall it, do as follows, for Qt version 4.4 and later:
1. In Assistant, open the Edit->Preferences dialog and choose the
Documentation tab. In the list of Registered Documentation, select
the item com.nokia.qtsolutions.some-package_version, and click
the Remove button.
For Qt versions prior to 4.4, do instead the following:
1. The directory your-install-dir/some-package/doc/html contains a
file called some-package.dcf. Execute the following commands in a
shell, command prompt or terminal window:
cd your-install-dir/some-package/doc/html/
assistant -removeContentFile some-package.dcf
Using the component as a DLL
----------------------------
1. Normal components
The shared library (DLL) is built and placed in the
some-package/lib directory. It is intended to be used directly
from there during development. When appropriate, both debug and
release versions are built, since the run-time linker will in some
cases refuse to load a debug-built DLL into a release-built
application or vice versa.
The following steps are taken by default to help the dynamic
linker to locate the DLL at run-time (during development):
Unix: The some-package.pri file will add linker instructions to
add the some-package/lib directory to the rpath of the
executable. (When distributing, or if your system does not support
rpath, you can copy the shared library to another place that is
searched by the dynamic linker, e.g. the "lib" directory of your
Qt installation.)
Mac: The full path to the library is hardcoded into the library
itself, from where it is copied into the executable at link time,
and ready by the dynamic linker at run-time. (When distributing,
you will want to edit these hardcoded paths in the same way as for
the Qt DLLs. Refer to the document "Deploying an Application on
Mac OS X" in the Qt Reference Documentation.)
Windows: the .dll file(s) are copied into the "bin" directory of
your Qt installation. The Qt installation will already have set up
that directory to be searched by the dynamic linke
qt-solutions-master
需积分: 0 70 浏览量
更新于2023-08-05
收藏 26.77MB ZIP 举报
"qt-solutions-master"是一个与Qt库相关的项目,主要展示了如何在Visual Studio(VC)环境中调用使用Qt库编写的用户界面(UI)动态链接库(Dll)。Qt是一个跨平台的C++图形用户界面应用程序开发框架,而VC++是Microsoft提供的一个集成开发环境,主要用于编写Windows平台的应用程序。这个项目结合了两者,为开发者提供了一种在VC环境下利用Qt UI功能的方法。
让我们详细了解一下Qt库。Qt库提供了丰富的组件和工具,用于构建桌面、移动和嵌入式系统的用户界面。它支持多种操作系统,如Windows、Linux、macOS、Android和iOS。Qt库基于C++,但通过其元对象系统和信号与槽机制,简化了事件驱动编程。此外,Qt也支持QML,一种声明式语言,用于构建现代、动态的用户界面。
在VC中调用Qt编写的Dll,首先你需要确保已经正确安装了Qt库,并且在VC环境中配置了Qt的编译器和库路径。这通常包括设置包含目录、库目录以及链接器输入项,以确保VC可以找到Qt的相关头文件和库文件。同时,为了运行Qt代码,可能还需要配置环境变量,比如添加Qt的bin目录到PATH中。
项目中的Dll是使用Qt库编写的,可能包含了Qt的UI部件、控件和布局等元素。在VC中使用这个Dll,你需要创建一个VC工程,然后通过动态链接的方式引入这个Dll。在VC的项目设置中,你需要指定Dll的接口,即导出的函数或类,以便在VC工程中调用。这些接口可能是用来初始化UI、处理用户交互或者更新显示等功能的。
对于C++编程,理解动态链接库(Dll)的概念也很重要。Dll是一种可执行文件,它可以被多个进程共享,从而节省内存并提高性能。在Windows平台上,Dll通过导出函数或类来提供服务。开发者需要定义导出函数的声明,并在Dll中实现它们,然后在主应用程序中导入和调用这些函数。
在"qt-solutions-master"项目中,可能包含了如何创建和使用Qt UI Dll的示例代码。通过分析这些代码,你可以学习到如何在Qt和VC之间进行跨进程通信,以及如何设计和实现可重用的UI模块。这将有助于你提高开发效率,特别是在需要在多个项目中使用相同UI设计的情况下。
"qt-solutions-master"项目提供了一个实用的学习资源,它涵盖了Qt库、VC++、C++ Dll以及跨平台UI开发等多个方面。通过深入研究这个项目,开发者可以提升在Windows环境中利用Qt开发高效、美观的用户界面的能力。
uniquely
- 粉丝: 0
- 资源: 10
最新资源
- Comsol 锂枝晶生长3个模型打包单枝晶,多枝晶,随机形核模型打包处理 给初学者玩家学习使用
- Formality各版本User Guide
- java项目,毕业设计-休闲娱乐代理售票系统
- Vue devtools 5.3.3开发者工具
- 轮式移动机器人轨迹跟踪的MATHLAB程序,运用运动学和动力学模型的双闭环控制,借鉴自抗扰控制技术结合了非线性ESO,跟踪效果良好,控制和抗扰效果较优,可分享控制结构图 这段程序主要是一个小车的动力
- 基于Transformer的最大MoE模型,拥有3890亿总参数和520亿激活参数
- 数据分析-31-疫情数据分析(包含代码和数据)
- Litermal 说明书
- 伺服控制器开发设计方案成熟量产伺服控制器方案 Is620伺服驱动电机,提供DSP程序和原理图,代码完整,学习工业代码的范例,采用ES232,RS485及CAN通讯接口处提供刚性表设置,惯性识别及振
- LIN一致性测试规范 SAE-J2602协议
- (23149420)STM32F407驱动LCD12864代码 LCD12864带中文字库
- (25463858)sxs-.net3.5.zip
- java项目,毕业设计-原创歌曲分享平台
- 使用 Python + pygame 实现植物大战僵尸游戏(源码)
- 基于 Super Text Mesh 的超链接文本
- (6921610)PIC16F877单片机