def save_geometry(self): """Save the arrangement of the whole window.""" SETTINGS['main_window.views'] = {name: len(self.get_views(name)) for name in self.views.keys()} SETTINGS['main_window.geometry'] = encode_bytearray( self.saveGeometry()) SETTINGS['main_window.state'] = encode_bytearray(self.saveState())
def save_geometry(self): """Save the arrangement of the whole window.""" # SETTINGS['main_window.views'] = {name: len(self.get_views(name)) # for name in self.views.keys()} SETTINGS['main_window.geometry'] = encode_bytearray( self.saveGeometry()) SETTINGS['main_window.state'] = encode_bytearray(self.saveState())
def test_bytearray(): str = "rueszhfghgfhfdfrtertrozerporkmlk" array = QtCore.QByteArray(str) encoded = encode_bytearray(array) decoded = decode_bytearray(encoded) assert str == decoded
def save_geometry(self): SETTINGS['channel_widget.geometry'] = encode_bytearray( self.saveGeometry()) SETTINGS['channel_widget.header'] = encode_bytearray( self.header().saveState())