Menus consists of an QActions so you probably need to add them too. If you have QMainWindow instance somewhere in your code and just want to fill menu items in EmailBlast init, you can get menu bar of mentioned QMainWindow by calling bar = (). Self.open_button = QtWidgets.QPushButton('Open')Įxception speaks truth: QWidget class does not have a menuBar attribute, QMainWindow has (as well as toolbars and status bar): Self.clear_button = QtWidgets.QPushButton('Clear') Self.save_button = QtWidgets.QPushButton('Save') Self.text_box = QtWidgets.QTextEdit(self) Updated project: class MainWindow(QtWidgets.QMainWindow): class EmailBlast(QtWidgets.QWidget):Įrror message: File "BasicEmail.py", line 84, in email_configįile "BasicEmail.py", line 96, in _init_ĪttributeError: 'EmailBlast' object has no attribute 'menuBar' Can someone help me, no tutorials seem to offer any way around. I am trying to load a menubar onto my gui, but my class object has no attribute for nuBar().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |