How to show all UI from another python file in current file when button is clicked.
-
@sdf1444
it has to inherit QWidget or be a QWidget to be used in a layout.
Else its plain impossible and you must create the inner Widgets yourself. :) -
Because it is a QWidget it should be able to be shown but why do I get an error and is there another way to write this code because of an error.
@sdf1444
make sure it's not because it miss a self in the right spot. -
@sdf1444
It was just a suggestion.
I dont know if that is the case. -
@sdf1444 said in How to show all UI from another python file in current file when button is clicked.:
class App(QWidget):
def init(self):
QMainWindow.init(self)Why are you declaring App to be a QWidget and then in the constructor try to do some initialisation based on QMainWindow ?
Note that App is not a really good name for a widget. Most people would think of a QCore/QGui/QApplication based class.
-
This post is deleted!
41/47