mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +03:00
0029571: Samples: build qt samples together with OCCT
Extending CMake procedure by 'BUILD_MODULE_QtSamples' variable to switch on qt samples build. Implementation required: - union of occt_toolkit_tool.cmake and occt_toolkit.cmake files; - correction of qt samples sources by adding path to Qt 'plugins' folder. It helps to avoid definition of additional variable (QT_QPA_PLATFORM_PLUGIN_PATH) when staring sample.bat for qt samples; - executable processing is extended in cmake procedure by providing 'EXECUTABLE_PROJECT' variable. Now we need not specify custom processing for DRAWEXE in occt_toolkit.cmake
This commit is contained in:
28
samples/qt/FuncDemo/src/FILES
Normal file
28
samples/qt/FuncDemo/src/FILES
Normal file
@@ -0,0 +1,28 @@
|
||||
BaseDriver.cpp
|
||||
BaseDriver.h
|
||||
CircleDriver.cpp
|
||||
CircleDriver.h
|
||||
ConeDriver.cpp
|
||||
ConeDriver.h
|
||||
CylinderDriver.cpp
|
||||
CylinderDriver.h
|
||||
edge.cpp
|
||||
edge.h
|
||||
FILES
|
||||
FThread.cpp
|
||||
FThread.h
|
||||
graphwidget.cpp
|
||||
graphwidget.h
|
||||
main.cpp
|
||||
mainwindow.cpp
|
||||
mainwindow.h
|
||||
node.cpp
|
||||
node.h
|
||||
PointDriver.cpp
|
||||
PointDriver.h
|
||||
PrismDriver.cpp
|
||||
PrismDriver.h
|
||||
ShapeSaverDriver.cpp
|
||||
ShapeSaverDriver.h
|
||||
SimpleDriver.cpp
|
||||
SimpleDriver.h
|
7
samples/qt/FuncDemo/src/FuncDemo.qrc
Normal file
7
samples/qt/FuncDemo/src/FuncDemo.qrc
Normal file
@@ -0,0 +1,7 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file alias="new.png">../images/new.png</file>
|
||||
<file alias="open.png">../images/open.png</file>
|
||||
<file alias="save.png">../images/save.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
@@ -41,8 +41,15 @@
|
||||
#include <QApplication>
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <OSD_Environment.hxx>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
#if QT_VERSION > 0x050000
|
||||
TCollection_AsciiString aPlugindsDirName = OSD_Environment ("QTDIR").Value();
|
||||
if (!aPlugindsDirName.IsEmpty())
|
||||
QApplication::addLibraryPath (QString (aPlugindsDirName.ToCString()) + "/plugins");
|
||||
#endif
|
||||
QApplication app(argc, argv);
|
||||
MainWindow mainWin;
|
||||
mainWin.show();
|
||||
|
Reference in New Issue
Block a user