Looking at the QDockWidgetArea it doesnt look that i can make a custom Area at all. TypeError: int() argument must be a string, a bytes-like object or a number, not 'QFrame' I also tried: from PyQt5.QtCore import QtĪnd in the createDock(self) function: myArea = Qt.DockWidgetArea(ame)īut i got: Traceback (most recent call last): Ship Lines move commercial cargo, military equipment, and anything else that needs to be moved from one country to another. TypeError: setAllowedAreas(self, Union): argument 1 has unexpected type 'QFrame' International Shipping and Ship Lines are crucial to the world economy. I tried (self.myFrame) but i got the expected error when clicking the button: Traceback (most recent call last): So obviously my DockWidget can go outside the frame. The generated window is in the image below: The main.ui file created with QtDesigner is just a widget window with a frame and a pushbutton. ( pydm is amodule that inherits all classes from PyQt and allows all default functionalities to work just fine.) Super(Window, self)._init_(None, args, macros, Please email to update emergency contact information or if you have any issues changing your email address. So currently my code is like this: #!/usr/local/bin/pydmĬlass Window(Display): #Main window class. It seems that setAllowedAreas() could do this restriction for me but it can only be used with QtDockWidgetAreas, and preexisting areas are just default areas of the main window. Thing is: i want my QDockWidget to only exist and be movable inside a frame of my mainwindow. Following this answer i came to the conclusion that i could use QDockWidgets to do this. I wanted to create a widget that lives inside a frame and that the user can move and resize at will.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |