Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Qt is a C++ based cross-platform application development framework which is widely used to develop a variety of desktop, mobile, and embedded system applications. Aspose.Words for C++ can be integrated within Qt in order to create and manipulate Word documents in your Qt applications. You can find complete Qt example at GitHub
For using Aspose.Words for C++ in your Qt application download the latest version of the API from the downloads section. Once the API is downloaded, you can use integrate the C++ library within Qt Creator or you can use with Visual Studio.
In order to integrate and use Aspose.Words for C++ library within a Qt Console Application developed in Qt Creator, please follow the steps given below:
Open Qt Creator and create a new Qt Console Application
Select the QMake
option from the Build System dropdown
Select the appropriate kit and finish the wizard.
Copy Aspose.Words.Cpp and CodePorting.Native.Cs2Cpp folders from the extracted package of Aspose.Words for C++ into the root of the project
In order to add paths to lib and include folders, right-click on the project in the LHS panel and select Add Library
Select the External Library option and browse paths to include and lib folders one by one
Once done, your .pro project file will contain the following entries
Build the application and you are done with the integration
Select the External Library option and browse paths to include and lib folders one by one
Once done, your .pro project file will contain the following entries
Build the application and you are done with the integration
For developing a Qt application using Visual Studio, you require to install Qt Visual Studio Tools. Once you have the installation, download the latest version of the API from the downloads section and follow the steps given below:
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
project(Qt_AsposeWords_CMake)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
find_package(CodePorting.Native.Cs2Cpp REQUIRED CONFIG PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH)
find_package(Aspose.Words.Cpp REQUIRED CONFIG PATHS ${CMAKE_CURRENT_SOURCE_DIR} NO_DEFAULT_PATH)
add_executable(Qt_AsposeWords_CMake
main.cpp
)
target_link_libraries(Qt_AsposeWords_CMake PRIVATE Qt5::Widgets Aspose::Words)
set_directory_properties(PROPERTIES VS_STARTUP_PROJECT Qt_AsposeWords_CMake)
file(TO_NATIVE_PATH "${Aspose.Words.Cpp_DIR}/lib/${CMAKE_VS_PLATFORM_NAME}" Aspose.Words.Cpp_DLL_PATH)
file(TO_NATIVE_PATH "${CodePorting.Native.Cs2Cpp_DIR}/lib" CodePorting.Native.Cs2Cpp_DLL_PATH)
file(TO_NATIVE_PATH "${Qt5_DIR}/../../../bin" Qt5_DLL_PATH)
set_target_properties(Qt_AsposeWords_CMake PROPERTIES VS_DEBUGGER_ENVIRONMENT "PATH=${Aspose.Words.Cpp_DLL_PATH}\\$<CONFIG>;${CodePorting.Native.Cs2Cpp_DLL_PATH};${Qt5_DLL_PATH};$(Path)")
cmake -G "Visual Studio 17 2022" -Thost=x64 -Ax64 -S . -B build -D"Qt5_DIR=<path-to-qt5>"
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.