eric7/WebBrowser/Navigation/NavigationContainer.py

branch
eric7
changeset 8312
800c432b34c8
parent 8218
7c09585bd960
child 8318
962bce857696
equal deleted inserted replaced
8311:4e8b98454baa 8312:800c432b34c8
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2017 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing the navigation container widget.
8 """
9
10 from PyQt5.QtWidgets import QWidget, QVBoxLayout, QSizePolicy
11
12
13 class NavigationContainer(QWidget):
14 """
15 Class implementing the navigation container widget.
16 """
17 def __init__(self, parent=None):
18 """
19 Constructor
20
21 @param parent reference to the parent widget
22 @type QWidget
23 """
24 super().__init__(parent)
25 self.setObjectName("navigationcontainer")
26
27 self.__layout = QVBoxLayout(self)
28 self.__layout.setContentsMargins(0, 0, 0, 0)
29 self.__layout.setSpacing(0)
30
31 self.setLayout(self.__layout)
32 self.setSizePolicy(QSizePolicy.Policy.Preferred,
33 QSizePolicy.Policy.Maximum)
34
35 def addWidget(self, widget):
36 """
37 Public method to add a widget to the container.
38
39 @param widget reference to the widget to be added
40 @type QWidget
41 """
42 self.__layout.addWidget(widget)

eric ide

mercurial