Use a splitter for the webinspector

This commit is contained in:
Florian Bruhin 2014-05-26 12:00:45 +02:00
parent d00a946497
commit f1f06b0a19

View File

@ -20,8 +20,8 @@
import binascii
from base64 import b64decode
from PyQt5.QtCore import pyqtSlot, QRect, QPoint, QCoreApplication
from PyQt5.QtWidgets import QWidget, QVBoxLayout
from PyQt5.QtCore import pyqtSlot, QRect, QPoint, QCoreApplication, Qt
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QSplitter
from PyQt5.QtWebKitWidgets import QWebInspector
import qutebrowser.commands.utils as cmdutils
@ -68,13 +68,18 @@ class MainWindow(QWidget):
self._vbox.setContentsMargins(0, 0, 0, 0)
self._vbox.setSpacing(0)
self._splitter = QSplitter(self, orientation=Qt.Vertical)
self.tabs = TabbedBrowser()
self._vbox.addWidget(self.tabs)
self._splitter.addWidget(self.tabs)
self.completion = CompletionView(self)
self.inspector = QWebInspector()
self.inspector.hide()
self._vbox.addWidget(self.inspector)
self._splitter.addWidget(self.inspector)
self._splitter.setStretchFactor(0, 50)
self._vbox.addWidget(self._splitter)
self.status = StatusBar()
self._vbox.addWidget(self.status)