Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
VTK
VTK
Commits
086af689
Commit
086af689
authored
Aug 30, 2020
by
Elvis Stansvik
Browse files
Put the QVTKRenderWindowInteractor in a main window
Closes #17992
parent
c9090e9d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Wrapping/Python/vtkmodules/qt/QVTKRenderWindowInteractor.py
View file @
086af689
...
...
@@ -92,6 +92,7 @@ if PyQtImpl == "PyQt5":
from
PyQt5.QtWidgets
import
QWidget
from
PyQt5.QtWidgets
import
QSizePolicy
from
PyQt5.QtWidgets
import
QApplication
from
PyQt5.QtWidgets
import
QMainWindow
from
PyQt5.QtGui
import
QCursor
from
PyQt5.QtCore
import
Qt
from
PyQt5.QtCore
import
QTimer
...
...
@@ -104,6 +105,7 @@ elif PyQtImpl == "PySide2":
from
PySide2.QtWidgets
import
QWidget
from
PySide2.QtWidgets
import
QSizePolicy
from
PySide2.QtWidgets
import
QApplication
from
PySide2.QtWidgets
import
QMainWindow
from
PySide2.QtGui
import
QCursor
from
PySide2.QtCore
import
Qt
from
PySide2.QtCore
import
QTimer
...
...
@@ -116,6 +118,7 @@ elif PyQtImpl == "PyQt4":
from
PyQt4.QtGui
import
QWidget
from
PyQt4.QtGui
import
QSizePolicy
from
PyQt4.QtGui
import
QApplication
from
PyQt4.QtGui
import
QMainWindow
from
PyQt4.QtCore
import
Qt
from
PyQt4.QtCore
import
QTimer
from
PyQt4.QtCore
import
QObject
...
...
@@ -127,6 +130,7 @@ elif PyQtImpl == "PySide":
from
PySide.QtGui
import
QWidget
from
PySide.QtGui
import
QSizePolicy
from
PySide.QtGui
import
QApplication
from
PySide.QtGui
import
QMainWindow
from
PySide.QtCore
import
Qt
from
PySide.QtCore
import
QTimer
from
PySide.QtCore
import
QObject
...
...
@@ -555,8 +559,11 @@ def QVTKRenderWidgetConeExample():
# every QT app needs an app
app
=
QApplication
([
'QVTKRenderWindowInteractor'
])
window
=
QMainWindow
()
# create the widget
widget
=
QVTKRenderWindowInteractor
()
widget
=
QVTKRenderWindowInteractor
(
window
)
window
.
setCentralWidget
(
widget
)
widget
.
Initialize
()
widget
.
Start
()
# if you don't want the 'q' key to exit comment this.
...
...
@@ -577,7 +584,7 @@ def QVTKRenderWidgetConeExample():
ren
.
AddActor
(
coneActor
)
# show the widget
wi
dget
.
show
()
wi
ndow
.
show
()
# start event processing
app
.
exec_
()
...
...
Elvis Stansvik
@estan
mentioned in commit
07304197
·
Aug 31, 2020
mentioned in commit
07304197
mentioned in commit 07304197eb99cc548811a33202fed26ca1afbf3f
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment