Skip to content

Commit

Permalink
Merge pull request #27 from openalea/visualea
Browse files Browse the repository at this point in the history
fixed  export to application not working #25
  • Loading branch information
pradal authored Jan 22, 2024
2 parents 66d569e + 65db25a commit a95272b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/openalea/core/template_app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ test_system()

from openalea.core import *
from openalea.core.pkgmanager import PackageManager
from qtpy import QtGui, QtCore
from qtpy import QtWidgets, QtCore


$FACTORY_CODE
Expand All @@ -46,14 +46,14 @@ $FACTORY_CODE

def open_window(factory):

dialog = QtGui.QDialog()
dialog = QtWidgets.QDialog()
widget = factory.instantiate_widget(autonomous=True)

dialog.setAttribute(QtCore.Qt.WA_DeleteOnClose)
widget.setParent(dialog)
vboxlayout = QtGui.QVBoxLayout(dialog)
vboxlayout.setMargin(3)

vboxlayout = QtWidgets.QVBoxLayout(dialog)
vboxlayout.setContentsMargins(3,3,3,3)
vboxlayout.setSpacing(5)
vboxlayout.addWidget(widget)

Expand All @@ -64,8 +64,8 @@ def open_window(factory):


def main(args):
app = QtGui.QApplication(args)

app = QtWidgets.QApplication(args)

p = PackageManager()
p.init()
Expand Down

0 comments on commit a95272b

Please sign in to comment.