First real layout
This commit is contained in:
parent
11a94957dc
commit
ae08f0e33a
@ -1,13 +1,44 @@
|
||||
import sys
|
||||
from PyQt5.QtWidgets import QApplication, QWidget
|
||||
from PyQt5.QtWidgets import (QApplication, QMainWindow, QVBoxLayout,
|
||||
QHBoxLayout, QTabWidget, QWidget, QLabel)
|
||||
from qutebrowser.widgets import CommandEdit
|
||||
|
||||
class TestWindow(QWidget):
|
||||
class TestWindow(QMainWindow):
|
||||
def __init__(self):
|
||||
super(TestWindow, self).__init__()
|
||||
self.ce = CommandEdit(self)
|
||||
self.ce.move(0, 0)
|
||||
self.resize(self.ce.sizeHint())
|
||||
super(self.__class__, self).__init__()
|
||||
self.setObjectName(self.__class__.__name__)
|
||||
|
||||
self.cwidget = QWidget(self)
|
||||
self.cwidget.setObjectName("cwidget")
|
||||
|
||||
self.vbox = QVBoxLayout(self.cwidget)
|
||||
self.vbox.setObjectName("vbox")
|
||||
self.setCentralWidget(self.cwidget)
|
||||
|
||||
self.tabs = QTabWidget(self.cwidget)
|
||||
self.tabs.setObjectName("tabs")
|
||||
self.tab = QWidget()
|
||||
self.tab.setObjectName("tab")
|
||||
self.tabs.addTab(self.tab, "test")
|
||||
self.vbox.addWidget(self.tabs)
|
||||
|
||||
self.status_hbox = QHBoxLayout()
|
||||
|
||||
self.status_cmd = CommandEdit(self.cwidget)
|
||||
self.status_cmd.setObjectName("status_cmd")
|
||||
self.status_hbox.addWidget(self.status_cmd)
|
||||
|
||||
self.status_lbl = QLabel(self.cwidget)
|
||||
self.status_lbl.setObjectName("status_lbl")
|
||||
self.status_lbl.setText("Hello World")
|
||||
self.status_hbox.addWidget(self.status_lbl)
|
||||
|
||||
self.vbox.addLayout(self.status_hbox)
|
||||
|
||||
#self.retranslateUi(MainWindow)
|
||||
#self.tabWidget.setCurrentIndex(0)
|
||||
#QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
self.show()
|
||||
|
||||
def main():
|
||||
|
Loading…
Reference in New Issue
Block a user