You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing my GUI with pyside6. When I launch Fluent with ui_mode="gui", my GUI will be open twice. If I change the ui_mode to other selection, the issue will not occur. But I need to launch Fluent with GUI.
📝 Steps to reproduce
Step 1: Build mian.py as following
from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton
import ansys.fluent.core as pyfluent
class MyMainWindow(QMainWindow):
def init(self):
super().init()
btn=QPushButton("OK",self)
#btn.move(100,100)
btn.clicked.connect(self.on_btn_clicked)
self.show()
🔍 Before submitting the issue
🐞 Description of the bug
I'm writing my GUI with pyside6. When I launch Fluent with ui_mode="gui", my GUI will be open twice. If I change the ui_mode to other selection, the issue will not occur. But I need to launch Fluent with GUI.
📝 Steps to reproduce
Step 1: Build mian.py as following
from PySide6.QtWidgets import QApplication, QMainWindow, QPushButton
import ansys.fluent.core as pyfluent
class MyMainWindow(QMainWindow):
def init(self):
super().init()
btn=QPushButton("OK",self)
#btn.move(100,100)
btn.clicked.connect(self.on_btn_clicked)
self.show()
if name=="main":
app=QApplication([])
window=MyMainWindow()
window.show()
app.exec()
Step 2: Build setup.py as following
from cx_Freeze import setup, Executable
import sys
base = None
if sys.platform == 'win32':
base = "Win32GUI"
target=Executable(script="ui_mian.py", base=base)
setup(
name = "Python_GUI",
version = "0.1",
description = "Python GUI",
executables = [target]
)
Step 3: open cmd, and cd to target folder, run ''python setup.py build''
Step 4: Run the .exe. Click the button "OK", and the MyMainWindow GUI will be open twice.
💻 Which operating system are you using?
Windows
📀 Which ANSYS version are you using?
Fluent 2024R2
🐍 Which Python version are you using?
3.10
📦 Installed packages
The text was updated successfully, but these errors were encountered: