17 |
17 |
18 class CookiesDialog(QDialog, Ui_CookiesDialog): |
18 class CookiesDialog(QDialog, Ui_CookiesDialog): |
19 """ |
19 """ |
20 Class implementing a dialog to show all cookies. |
20 Class implementing a dialog to show all cookies. |
21 """ |
21 """ |
22 DomainRole = Qt.UserRole + 1 |
22 DomainRole = Qt.ItemDataRole.UserRole + 1 |
23 CookieRole = Qt.UserRole + 2 |
23 CookieRole = Qt.ItemDataRole.UserRole + 2 |
24 |
24 |
25 def __init__(self, cookieJar, parent=None): |
25 def __init__(self, cookieJar, parent=None): |
26 """ |
26 """ |
27 Constructor |
27 Constructor |
28 |
28 |
51 @pyqtSlot() |
51 @pyqtSlot() |
52 def __resizeColumns(self): |
52 def __resizeColumns(self): |
53 """ |
53 """ |
54 Private slot to resize the columns. |
54 Private slot to resize the columns. |
55 """ |
55 """ |
56 self.cookiesTree.header().resizeSections(QHeaderView.ResizeToContents) |
56 self.cookiesTree.header().resizeSections( |
|
57 QHeaderView.ResizeMode.ResizeToContents) |
57 self.cookiesTree.header().setStretchLastSection(True) |
58 self.cookiesTree.header().setStretchLastSection(True) |
58 |
59 |
59 def __cookieDomain(self, cookie): |
60 def __cookieDomain(self, cookie): |
60 """ |
61 """ |
61 Private method to extract the cookie domain. |
62 Private method to extract the cookie domain. |