Python PyQt5.QtWidgets.QFrame() Examples

The following are 30 code examples for showing how to use PyQt5.QtWidgets.QFrame(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module PyQt5.QtWidgets , or try the search function .

Example 1
Project: FIRST-plugin-ida   Author: vrtadmin   File: first.py    License: GNU General Public License v2.0 7 votes vote down vote up
def __init__(self, parent=None, frame=QtWidgets.QFrame.Box):
            super(FIRSTUI.ScrollWidget, self).__init__()

            #   Container Widget
            widget = QtWidgets.QWidget()
            #   Layout of Container Widget
            self.layout = QtWidgets.QVBoxLayout(self)
            self.layout.setContentsMargins(0, 0, 0, 0)
            widget.setLayout(self.layout)

            #   Scroll Area Properties
            scroll = QtWidgets.QScrollArea()
            scroll.setFrameShape(frame)
            scroll.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
            scroll.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
            scroll.setWidgetResizable(True)
            scroll.setWidget(widget)

            #   Scroll Area Layer add
            scroll_layout = QtWidgets.QVBoxLayout(self)
            scroll_layout.addWidget(scroll)
            scroll_layout.setContentsMargins(0, 0, 0, 0)
            self.setLayout(scroll_layout) 
Example 2
Project: pkmeter   Author: pkkid   File: pkcharts.py    License: BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def paintEvent(self, event):
        QtWidgets.QFrame.paintEvent(self, event)
        painter = QtGui.QPainter()
        painter.begin(self)
        painter.setRenderHint(QtGui.QPainter.Antialiasing)
        painter.setPen(Qt.NoPen)
        # Draw the Pie
        rwidth = int(min([self.width(), self.height()]) - 2)
        x = int((self.width() / 2) - (rwidth / 2))
        y = int((self.height() / 2) - (rwidth / 2))
        rect = QtCore.QRect(x, y, rwidth, rwidth)
        angle1 = 0
        for i in range(len(self.data)):
            angle2 = angle1 + (3.6 * self.data[i])
            painter.setBrush(QtGui.QBrush(self.colors[i % len(self.colors)]))
            painter.drawPie(rect, angle1*-16, (angle2-angle1)*-16)
            angle1 = angle2
        # Draw the remainer (background)
        angle2 = 360
        painter.setBrush(QtGui.QBrush(self.bgcolor))
        painter.drawPie(rect, angle1*-16, (angle2-angle1)*-16)
        painter.end() 
Example 3
Project: pkmeter   Author: pkkid   File: pkcharts.py    License: BSD 3-Clause "New" or "Revised" License 6 votes vote down vote up
def paintEvent(self, event):
        if not self.data: return
        QtWidgets.QFrame.paintEvent(self, event)
        painter = QtGui.QPainter()
        painter.begin(self)
        painter.setRenderHint(QtGui.QPainter.Antialiasing)
        # Draw background
        painter.setBrush(QtGui.QBrush(self.bgcolor))
        painter.setPen(Qt.NoPen)
        painter.drawRoundedRect(self.contentsRect(), 2, 2)
        # Draw the bars
        barwidth = (self.width() - 4) / len(self.data)
        for i in range(len(self.data)):
            barheight = int(self.height() * (self.data[i] / 100))
            baroffset = i * barwidth + 2
            painter.setBrush(QtGui.QBrush(self.colors[i % len(self.colors)]))
            painter.drawRoundedRect(baroffset, self.height()-barheight, barwidth, barheight, 1, 1)
        painter.end() 
Example 4
Project: visma   Author: aerospaceresearch   File: window.py    License: GNU General Public License v3.0 6 votes vote down vote up
def buttonsLayout(self):
        self.matrix = False
        vbox = QVBoxLayout()
        interactionModeLayout = QVBoxLayout()
        self.interactionModeButton = QtWidgets.QPushButton('visma')
        self.interactionModeButton.clicked.connect(self.interactionMode)
        interactionModeLayout.addWidget(self.interactionModeButton)
        interactionModeWidget = QWidget(self)
        interactionModeWidget.setLayout(interactionModeLayout)
        interactionModeWidget.setFixedSize(275, 50)
        topButtonSplitter = QSplitter(Qt.Horizontal)
        topButtonSplitter.addWidget(interactionModeWidget)
        permanentButtons = QWidget(self)
        topButtonSplitter.addWidget(permanentButtons)
        self.bottomButton = QFrame()
        self.buttonSplitter = QSplitter(Qt.Vertical)
        self.buttonSplitter.addWidget(topButtonSplitter)
        self.buttonSplitter.addWidget(self.bottomButton)
        vbox.addWidget(self.buttonSplitter)
        return vbox 
Example 5
Project: FIRST-plugin-ida   Author: vrtadmin   File: first.py    License: GNU General Public License v2.0 6 votes vote down vote up
def view_configuration_info(self):
        self.thread_stop = True
        container = QtWidgets.QVBoxLayout()

        label = QtWidgets.QLabel('Configuration Information')
        label.setStyleSheet('font: 18px;')
        container.addWidget(label)

        layout = QtWidgets.QHBoxLayout()
        self.message = QtWidgets.QLabel()
        layout.addWidget(self.message)
        layout.addStretch()
        save_button = QtWidgets.QPushButton('Save')
        layout.addWidget(save_button)

        scroll_layout = FIRSTUI.ScrollWidget(frame=QtWidgets.QFrame.NoFrame)
        FIRSTUI.SharedObjects.server_config_layout(self, scroll_layout, FIRST.config)

        container.addWidget(scroll_layout)
        container.addStretch()
        container.addLayout(layout)

        save_button.clicked.connect(self.save_config)

        return container 
Example 6
Project: ddt4all   Author: cedricp   File: dataeditor.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, dataitem, parent=None):
        super(otherPanel, self).__init__(parent)
        self.setFrameStyle(widgets.QFrame.Sunken)
        self.setFrameShape(widgets.QFrame.Box)
        self.data = dataitem

        layout = widgets.QGridLayout()
        labelnob = widgets.QLabel(_("Number of bytes"))
        lableunit = widgets.QLabel(_("Unit"))

        layout.addWidget(labelnob, 0, 0)
        layout.addWidget(lableunit, 1, 0)
        layout.setRowStretch(2, 1)

        self.inputnob = widgets.QSpinBox()
        self.inputnob.setRange(1, 10240)
        self.inputtype = widgets.QComboBox()
        self.inputtype.addItem("ASCII")
        self.inputtype.addItem("BCD/HEX")

        layout.addWidget(self.inputnob, 0, 1)
        layout.addWidget(self.inputtype, 1, 1)

        self.setLayout(layout)
        self.init() 
Example 7
Project: 3d-nii-visualizer   Author: adamkwolf   File: MainWindow.py    License: MIT License 6 votes vote down vote up
def setup():
        """
        Create and setup the base vtk and Qt objects for the application
        """
        renderer = vtk.vtkRenderer()
        frame = QtWidgets.QFrame()
        vtk_widget = QVTKRenderWindowInteractor()
        interactor = vtk_widget.GetRenderWindow().GetInteractor()
        render_window = vtk_widget.GetRenderWindow()

        frame.setAutoFillBackground(True)
        vtk_widget.GetRenderWindow().AddRenderer(renderer)
        render_window.AddRenderer(renderer)
        interactor.SetRenderWindow(render_window)
        interactor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera())

        # required to enable overlapping actors with opacity < 1.0
        # this is causing some issues with flashing objects
        # render_window.SetAlphaBitPlanes(1)
        # render_window.SetMultiSamples(0)
        # renderer.UseDepthPeelingOn()
        # renderer.SetMaximumNumberOfPeels(2)

        return renderer, frame, vtk_widget, interactor, render_window 
Example 8
Project: pychemqt   Author: jjgomera   File: widgets.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, state=0, text="", parent=None):
        """
        state:
            0   -   Not solved
            1   -   OK
            2   -   Ignore
            3   -   Warning (Recommend: Use text parameter to explain)
            4   -   Calculating
            5   -   Error
        """
        super(Status, self).__init__(parent)
        self.setState(state)
        self.setAlignment(QtCore.Qt.AlignCenter)
        self.setFrameShadow(QtWidgets.QFrame.Sunken)
        self.setFrameShape(QtWidgets.QFrame.Panel)
        self.setSizePolicy(QtWidgets.QSizePolicy.Expanding,
                           QtWidgets.QSizePolicy.Preferred)
        self.oldState = 0
        self.oldText = "" 
Example 9
Project: pychemqt   Author: jjgomera   File: widgets.py    License: GNU General Public License v3.0 6 votes vote down vote up
def __init__(self, tex, fs=12, *args, **kw):
        """
        Parameters
        ----------
        tex : str
            Latex code text of mathematical expresion to show
        fs : int
            Font size used in image
        """
        super(QLabelMath, self).__init__(*args, **kw)
        self.setAlignment(QtCore.Qt.AlignCenter)
        self.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.setFrameStyle(QtWidgets.QFrame.Plain)
        pixmap = mathTex2QPixmap(tex, fs)
        self.setPixmap(pixmap)
        self.fs = fs 
Example 10
Project: universal_tool_template.py   Author: shiningdesign   File: LNTextEdit.py    License: MIT License 6 votes vote down vote up
def __init__(self, *args):
            QtWidgets.QPlainTextEdit.__init__(self, *args)
            self.setFrameStyle(QtWidgets.QFrame.NoFrame)
            self.zoomWheelEnabled = 0
            self.highlight()
            #self.setLineWrapMode(QtWidgets.QPlainTextEdit.NoWrap)
            self.cursorPositionChanged.connect(self.highlight) 
Example 11
Project: universal_tool_template.py   Author: shiningdesign   File: LNTextEdit.py    License: MIT License 6 votes vote down vote up
def __init__(self, *args):
        QtWidgets.QFrame.__init__(self, *args)
 
        self.setFrameStyle(QtWidgets.QFrame.StyledPanel | QtWidgets.QFrame.Sunken)
 
        self.edit = self.PlainTextEdit()
        self.number_bar = self.NumberBar(self.edit)
 
        hbox = QtWidgets.QHBoxLayout(self)
        hbox.setSpacing(0)
        hbox.setContentsMargins(0,0,0,0) # setMargin
        hbox.addWidget(self.number_bar)
        hbox.addWidget(self.edit)
 
        self.edit.blockCountChanged.connect(self.number_bar.adjustWidth)
        self.edit.updateRequest.connect(self.number_bar.updateContents) 
Example 12
Project: pkmeter   Author: pkkid   File: pkwidgets.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def __init__(self, etree, control, parent=None):
        QtWidgets.QFrame.__init__(self)
        self.setLayout(QtWidgets.QHBoxLayout())
        self.layout().setContentsMargins(0,0,0,0)
        self.layout().setSpacing(0)
        pkmixins.StashMixin._init(self)
        pkmixins.LayoutMixin._init(self, etree, control, parent) 
Example 13
Project: pkmeter   Author: pkkid   File: pkwidgets.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def paintEvent(self, event):
        QtWidgets.QFrame.paintEvent(self, event)
        return self._paint_frame(event) 
Example 14
Project: pkmeter   Author: pkkid   File: pkwidgets.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def paintEvent(self, event):
        QtWidgets.QFrame.paintEvent(self, event)
        painter = QtGui.QPainter()
        painter.begin(self)
        painter.setRenderHint(QtGui.QPainter.Antialiasing)
        painter.setPen(Qt.NoPen)
        if self.enabled: self.paint_slider_on(painter)
        else: self.paint_slider_off(painter)
        painter.end() 
Example 15
Project: pkmeter   Author: pkkid   File: pkwidgets.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def __init__(self, etree, control, parent=None):
        QtWidgets.QFrame.__init__(self)
        self.setLayout(QtWidgets.QVBoxLayout())
        self.layout().setContentsMargins(0,0,0,0)
        self.layout().setSpacing(0)
        pkmixins.StashMixin._init(self)
        pkmixins.LayoutMixin._init(self, etree, control, parent) 
Example 16
Project: pkmeter   Author: pkkid   File: pkwidgets.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def paintEvent(self, event):
        QtWidgets.QFrame.paintEvent(self, event)
        return self._paint_frame(event) 
Example 17
Project: pkmeter   Author: pkkid   File: pkcharts.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def paintEvent(self, event):
        if not self.data: return
        QtWidgets.QFrame.paintEvent(self, event)
        painter = QtGui.QPainter()
        painter.begin(self)
        painter.setRenderHint(QtGui.QPainter.Antialiasing)
        # Draw background
        painter.setBrush(QtGui.QBrush(self.bgcolor))
        painter.setPen(Qt.NoPen)
        painter.drawRoundedRect(self.contentsRect(), 2, 2)
        # Draw the Lines
        for i in range(len(self.data[0])):
            path = None
            pen = QtGui.QPen(self.colors[i % len(self.colors)])
            for j in range(len(self.data)):
                value = self.data[j][i]
                prevvalue = self.data[j-1][i]
                if value == -1 or prevvalue == -1:
                    continue
                if not self.showzero and value <= 0 and prevvalue <= 0:
                    continue
                x1 = (self.pxperpt * (j - 0.5) + self.pxperpt / 4) - self.offset
                x2 = (self.pxperpt * j + self.pxperpt / 4) - self.offset
                y1 = self.height() - int((self.height() - 1) * (prevvalue / self.maxvalue))
                y2 = self.height() - int((self.height() - 1) * (value / self.maxvalue))
                path = path or QtGui.QPainterPath(QtCore.QPointF(x1,y1))
                path.cubicTo(x1, y1, x1, y2, x2, y2)
            if path:
                painter.strokePath(path, pen)
        painter.end() 
Example 18
Project: pkmeter   Author: pkkid   File: pkcharts.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def __init__(self, etree, control, parent=None):
        QtWidgets.QFrame.__init__(self)
        self.bgcolor = QtGui.QColor(255,255,255,13)     # Chart background color
        self.colors = [QtGui.QColor(255,0,0)]           # Chart line colors
        self.data = []                                  # Current plot data
        pkmixins.LayoutMixin._init(self, etree, control, parent) 
Example 19
Project: pkmeter   Author: pkkid   File: pkcharts.py    License: BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
def __init__(self, etree, control, parent=None):
        QtWidgets.QFrame.__init__(self)
        self.bgcolor = QtGui.QColor(255,255,255,10)     # Chart background color
        self.colors = [QtGui.QColor(255,0,0)]           # Chart line colors
        self.data = []                                  # Current plot data
        pkmixins.LayoutMixin._init(self, etree, control, parent) 
Example 20
Project: mindfulness-at-the-computer   Author: mindfulness-at-the-computer   File: rest_prepare.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self):
        super().__init__(None, WINDOW_FLAGS)

        self.setFrameStyle(QtWidgets.QFrame.Box | QtWidgets.QFrame.Plain)
        self.setLineWidth(1)

        vbox_l2 = QtWidgets.QVBoxLayout()
        self.setLayout(vbox_l2)

        self.setMinimumHeight(MIN_HEIGHT_INT)

        self.title_qll = QtWidgets.QLabel(self.tr("Please prepare for rest"))
        vbox_l2.addWidget(self.title_qll)
        self.title_qll.setWordWrap(True)

        self.reminder_qll = QtWidgets.QLabel(self.tr("One minute left until the next rest"))
        vbox_l2.addWidget(self.reminder_qll)
        self.reminder_qll.setWordWrap(True)

        self.show()  # -done after all the widget have been added so that the right size is set
        self.raise_()
        self.showNormal()

        # Set position - done after show to get the right size hint
        screen_qrect = QtWidgets.QApplication.desktop().availableGeometry()
        xpos_int = screen_qrect.right() - self.sizeHint().width() - 30
        ypos_int = screen_qrect.top() + 30
        self.move(xpos_int, ypos_int)

        self.shown_qtimer = None
        self.start_shown_timer()

        self.setStyleSheet("background-color: #101010; color: #999999;") 
Example 21
Project: interSubs   Author: oltodosel   File: interSubs.py    License: MIT License 5 votes vote down vote up
def subtitles_base(self):
		self.subtitles = QFrame()
		self.subtitles.setAttribute(Qt.WA_TranslucentBackground)
		self.subtitles.setWindowFlags(Qt.X11BypassWindowManagerHint)
		self.subtitles.setStyleSheet(config.style_subs)

		self.subtitles_vbox = QVBoxLayout(self.subtitles)
		self.subtitles_vbox.setSpacing(config.subs_padding_between_lines)
		self.subtitles_vbox.setContentsMargins(0, 0, 0, 0) 
Example 22
Project: interSubs   Author: oltodosel   File: interSubs.py    License: MIT License 5 votes vote down vote up
def subtitles_base2(self):
		self.subtitles2 = QFrame()
		self.subtitles2.setAttribute(Qt.WA_TranslucentBackground)
		self.subtitles2.setWindowFlags(Qt.X11BypassWindowManagerHint)
		self.subtitles2.setStyleSheet(config.style_subs)

		self.subtitles_vbox2 = QVBoxLayout(self.subtitles2)
		self.subtitles_vbox2.setSpacing(config.subs_padding_between_lines)
		self.subtitles_vbox2.setContentsMargins(0, 0, 0, 0)

		if config.pause_during_translation_B:
			self.subtitles2.enterEvent = lambda event : [mpv_pause(), setattr(config, 'block_popup', False)][0]
			self.subtitles2.leaveEvent = lambda event : [mpv_resume(), setattr(config, 'block_popup', True)][0] if not config.avoid_resuming else [setattr(config, 'avoid_resuming', False), setattr(config, 'block_popup', True)][0] 
Example 23
Project: interSubs   Author: oltodosel   File: interSubs.py    License: MIT License 5 votes vote down vote up
def popup_base(self):
		self.popup = QFrame()
		self.popup.setAttribute(Qt.WA_TranslucentBackground)
		self.popup.setWindowFlags(Qt.X11BypassWindowManagerHint)
		self.popup.setStyleSheet(config.style_popup)

		self.popup_inner = QFrame()
		outer_box = QVBoxLayout(self.popup)
		outer_box.addWidget(self.popup_inner)

		self.popup_vbox = QVBoxLayout(self.popup_inner)
		self.popup_vbox.setSpacing(0) 
Example 24
Project: pyleecan   Author: Eomys   File: SidebarWindow.py    License: Apache License 2.0 5 votes vote down vote up
def __init__(self):
        # === App-Init ===
        super(SidebarWindow, self).__init__()
        self._title = "Pyleecan"
        self.setWindowTitle(self._title)
        self._main = QtWidgets.QWidget()
        self.setCentralWidget(self._main)

        # === Main Widgets ===
        # Navigation Panel with Button Group
        self.nav_panel = QtWidgets.QFrame()

        self.nav_btn_grp = QtWidgets.QButtonGroup()
        self.nav_btn_grp.setExclusive(True)
        self.nav_btn_grp.buttonClicked[int].connect(self.switch_stack)
        self.btn_grp_fct = []

        self.nav_layout = QtWidgets.QVBoxLayout(self.nav_panel)
        self.nav_layout.setContentsMargins(2, 2, 2, 2)
        self.nav_layout.addStretch(1)  # add stretch first

        # Sub Window Stack
        self.io_stack = QtWidgets.QStackedWidget(self)

        # Seperator Line
        line = QtWidgets.QFrame()
        line.setStyleSheet("QFrame { background-color: rgb(200, 200, 200) }")
        line.setFixedWidth(2)

        # === Main Layout ===
        main_layout = QtWidgets.QHBoxLayout()
        main_layout.addWidget(self.nav_panel)
        main_layout.addWidget(line)
        main_layout.addWidget(self.io_stack)

        self._main.setLayout(main_layout)

        self.show()
        self.centerOnScreen() 
Example 25
Project: ddt4all   Author: cedricp   File: displaymod.py    License: GNU General Public License v3.0 5 votes vote down vote up
def toggle_selected(self, sel):
        if sel:
            self.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.StyledPanel)
        else:
            self.setFrameStyle(widgets.QFrame.NoFrame) 
Example 26
Project: ddt4all   Author: cedricp   File: displaymod.py    License: GNU General Public License v3.0 5 votes vote down vote up
def toggle_selected(self, sel):
        if sel:
            self.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.StyledPanel)
        else:
            self.setFrameStyle(widgets.QFrame.NoFrame) 
Example 27
Project: ddt4all   Author: cedricp   File: displaymod.py    License: GNU General Public License v3.0 5 votes vote down vote up
def toggle_selected(self, sel):
        if sel:
            #self.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.StyledPanel)
            pass
        else:
            #self.setFrameStyle(0)
            pass 
Example 28
Project: ddt4all   Author: cedricp   File: displaymod.py    License: GNU General Public License v3.0 5 votes vote down vote up
def toggle_selected(self, sel):
        if sel:
            self.qlabel.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.StyledPanel)
            self.qlabelval.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.StyledPanel)
        else:
            self.qlabel.setFrameStyle(widgets.QFrame.NoFrame)
            self.qlabelval.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.Sunken) 
Example 29
Project: ddt4all   Author: cedricp   File: displaymod.py    License: GNU General Public License v3.0 5 votes vote down vote up
def toggle_selected(self, sel):
        if sel:
            self.qlabel.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.StyledPanel)
            #self.editwidget.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.StyledPanel)
        else:
            self.qlabel.setFrameStyle(widgets.QFrame.NoFrame)
            #self.editwidget.setFrameStyle(widgets.QFrame.Panel | widgets.QFrame.Sunken) 
Example 30
Project: ddt4all   Author: cedricp   File: dataeditor.py    License: GNU General Public License v3.0 5 votes vote down vote up
def __init__(self, dataitem, parent=None):
        super(numericListPanel, self).__init__(parent)
        self.setFrameStyle(widgets.QFrame.Sunken)
        self.setFrameShape(widgets.QFrame.Box)
        self.data = dataitem

        layoutv = widgets.QVBoxLayout()
        layout = widgets.QGridLayout()
        labelnob = widgets.QLabel(_("Number of bits"))
        lablelsigned = widgets.QLabel(_("Signed"))
        newitem = widgets.QPushButton(_("Add item"))
        delitem = widgets.QPushButton(_("Del item"))

        newitem.clicked.connect(self.add_item)
        delitem.clicked.connect(self.def_item)

        layout.addWidget(labelnob, 0, 0)
        layout.addWidget(lablelsigned, 1, 0)
        layout.addWidget(newitem, 2, 0)
        layout.addWidget(delitem, 2, 1)

        self.inputnob = widgets.QSpinBox()
        self.inputnob.setRange(1, 32)
        self.inputsigned = widgets.QCheckBox()

        layout.addWidget(self.inputnob, 0, 1)
        layout.addWidget(self.inputsigned, 1, 1)

        layoutv.addLayout(layout)

        self.itemtable = widgets.QTableWidget()
        self.itemtable.setRowCount(1)
        self.itemtable.setColumnCount(2)
        self.itemtable.verticalHeader().hide()
        self.itemtable.setSelectionBehavior(widgets.QAbstractItemView.SelectRows)
        self.itemtable.setSelectionMode(widgets.QAbstractItemView.SingleSelection)

        layoutv.addWidget(self.itemtable)

        self.setLayout(layoutv)
        self.init()