eric6/WebBrowser/Navigation/NavigationContainer.py

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

eric ide

mercurial