@@ -44,12 +44,14 @@ class MyMainWindow : public QMainWindow
4444 {
4545 QMenuBar* aMenuBar = new QMenuBar ();
4646 QMenu* aMenuWindow = aMenuBar->addMenu (" &File" );
47+ #if (OCC_VERSION_HEX >= 0x070700)
4748 {
4849 QAction* anActionSplit = new QAction (aMenuWindow);
4950 anActionSplit->setText (" Split Views" );
5051 aMenuWindow->addAction (anActionSplit);
5152 connect (anActionSplit, &QAction::triggered, [this ]() { splitSubviews (); });
5253 }
54+ #endif
5355 {
5456 QAction* anActionQuit = new QAction (aMenuWindow);
5557 anActionQuit->setText (" Quit" );
@@ -104,12 +106,13 @@ class MyMainWindow : public QMainWindow
104106 connect (aSlider, &QSlider::valueChanged, [this ](int theValue) {
105107 const float aVal = theValue / 255 .0f ;
106108 const Quantity_Color aColor (aVal, aVal, aVal, Quantity_TOC_sRGB);
107-
109+ # if (OCC_VERSION_HEX >= 0x070700)
108110 for (const Handle (V3d_View)& aSubviewIter : myViewer->View ()->Subviews ())
109111 {
110112 aSubviewIter->SetBgGradientColors (aColor, Quantity_NOC_BLACK, Aspect_GradientFillMethod_Elliptical);
111113 aSubviewIter->Invalidate ();
112114 }
115+ #endif
113116 // myViewer->View()->SetBackgroundColor(aColor);
114117 myViewer->View ()->SetBgGradientColors (aColor, Quantity_NOC_BLACK, Aspect_GradientFillMethod_Elliptical);
115118 myViewer->View ()->Invalidate ();
@@ -120,6 +123,7 @@ class MyMainWindow : public QMainWindow
120123 }
121124 }
122125
126+ #if (OCC_VERSION_HEX >= 0x070700)
123127 // ! Advanced method splitting 3D Viewer into sub-views.
124128 void splitSubviews ()
125129 {
@@ -157,6 +161,7 @@ class MyMainWindow : public QMainWindow
157161 myViewer->View ()->Invalidate ();
158162 myViewer->update ();
159163 }
164+ #endif
160165};
161166
162167int main (int theNbArgs, char ** theArgVec)
0 commit comments