Hi all,
I have 2 form and a main.py in the project: ffrend.py and fmain.py
main.py:
from PyQt4 import QtCore, QtGui
from fmain import *
if __name__ == "__main__":
import sys
app = QtGui.QApplication(sys.argv)
MainWindow = QtGui.QMainWindow()
ui = Ui_MainWindow()
ui.setupUi(MainWindow)
MainWindow.show()
app.exec_()
fmain.py (there is a button to execute the following function)
def friendNetWork(self):
form = QtGui.QWidget()
ui = Ui_ffriend()
ui.setupUi(form)
form.show()
app.exec_()
When I run main.py, the fmain form is shown. When I click the button on fmain form, the friendNetWork will be executed and create another widget.
But...I received the error in console :(...And the python is hang :(
QCoreApplication::exec: The event loop is already running
QCoreApplication::exec: The event loop is already running
QCoreApplication::exec: The event loop is already running
QCoreApplication::exec: The event loop is already running
Please help me with this