def __init__(self, parent=None):
    self.m_flag = False
    super(AdminMain, self).__init__(parent)
    self.setWindowTitle('VegeTableT')
    self.setWindowIcon(QIcon('./evol/logo.ico'))
    self.setAttribute(Qt.Qt.WA_TranslucentBackground)
    self.setContextMenuPolicy(Qt.Qt.CustomContextMenu)
    self.customContextMenuRequested.connect(self.close)
    self.setWindowFlags(((Qt.Qt.FramelessWindowHint | Qt.Qt.Tool) | Qt.Qt.WindowStaysOnTopHint))
    self.moveToRight()
    flo = QFormLayout()
    rnbtn = QPushButton('随机提问')
    rnbtn.setObjectName('bluebutton')
    self.wd = Random_name()
    channel = QWebChannel()
    cnobj = CallHandler()
    channel.registerObject('bridge', cnobj)
    self.wd.browser.page().setWebChannel(channel)
    rnbtn.clicked.connect(self.startRandomName)
    flo.addRow(rnbtn)
    self.setLayout(flo)
def __init__(self, parent=None):
    self.m_flag = False
    super(AdminMain, self).__init__(parent)
    self.setWindowTitle('VegeTableT')
    self.setWindowIcon(QIcon('./evol/logo.ico'))
    self.setAttribute(Qt.Qt.WA_TranslucentBackground)
    self.setContextMenuPolicy(Qt.Qt.CustomContextMenu)
    self.customContextMenuRequested.connect(self.close)
    self.setWindowFlags(((Qt.Qt.FramelessWindowHint | Qt.Qt.Tool) | Qt.Qt.WindowStaysOnTopHint))
    self.moveToRight()
    flo = QFormLayout()
    rnbtn = QPushButton('随机提问')
    rnbtn.setObjectName('bluebutton')
    self.wd = Random_name()
    channel = QWebChannel()
    cnobj = CallHandler()
    channel.registerObject('bridge', cnobj)
    self.wd.browser.page().setWebChannel(channel)
    rnbtn.clicked.connect(self.startRandomName)
    flo.addRow(rnbtn)
    self.setLayout(flo)