示例#1
0
 def addUserInfoOnToolBar(self):
   res_data=get_current_credit()
   self.id_lbl.setText(f'ID : {res_data["id"]}')
   self.crdt_lbl.setText(f'Credit : {res_data["credit"]}')
   self.toolbar.addWidget(self.center_space) #
   self.toolbar.addWidget(self.id_lbl) #
   self.toolbar.addWidget(self.space)
   self.toolbar.addWidget(self.crdt_lbl) #
   self.toolbar.addWidget(self.space_)
示例#2
0
 def openModeClass(self):
     widget.setCurrentIndex(2)
     Credit_ly = CreditLayout()
     BrDown_ly = BrDownLayout()
     WebView_ly = WebViewLayout()
     widget.addWidget(Credit_ly)  # 9
     widget.addWidget(BrDown_ly)  # 10
     widget.addWidget(WebView_ly)  # 11
     res_data = get_current_credit()
     Credit_ly.credit_amount = str(res_data["credit"])
     # 여기서 크레딧페이지 생성
     on_layout_convert_center(main_window, widget, 450, 250)
示例#3
0
    def init_ui(self):

        res = get_current_credit()
        self.credit_amount = str(res["credit"])
        self.label = QLabel(self.credit_amount + '원', self)  # 얼마인지 출력
        self.label.setAlignment(Qt.AlignCenter)
        self.label_font = self.label.font()
        self.label_font.setPointSize(25)
        self.label_font.setBold(True)
        self.label.setFont(self.label_font)

        #self.credit_lbl = QLabel('Credit', self)
        #self.credit_lbl.setAlignment(Qt.AlignCenter)
        #self.credit_lbl_font = self.credit_lbl.font()
        #self.credit_lbl_font.setPointSize(10)
        #self.credit_lbl_font.setBold(True)
        #self.credit_lbl.setFont(self.credit_lbl_font)

        # 크레딧 충전 버튼
        self.dep_btn = QPushButton('크레딧 충전', self)
        self.dep_btn.setFont(QFont('맑은 고딕', 12))
        setBigButtonStyle(self.dep_btn)

        # 내역 확인 버튼
        self.all_btn = QPushButton('내역 확인', self)
        self.all_btn.setFont(QFont('맑은 고딕', 12))
        setBigButtonStyle(self.all_btn)

        # 새로 고침 버튼
        self.refresh = QPushButton('새로 고침', self)
        self.refresh.setFont(QFont('맑은 고딕', 12))
        setBigButtonStyle(self.refresh)

        # 레이아웃 설정
        # addWidget (self, QWidget, row, column, rowSpan, columnSpan, Qt.Alignment alignment = 0)
        layout = QGridLayout()
        #layout.addWidget(self.credit_lbl, 0, 0)
        layout.addWidget(self.label, 1, 0, -1, 1)
        layout.addWidget(self.dep_btn, 1, 1)
        layout.addWidget(self.all_btn, 2, 1)
        layout.addWidget(self.refresh, 3, 1)
        self.setLayout(layout)
示例#4
0
 def onRefreshButton(self):
     self.onRefreshHandler()
     res = get_current_credit()
     main_window.crdt_lbl.setText(f'Credit : {res["credit"]}')
示例#5
0
 def onRefreshHandler(self):
     res = get_current_credit()
     self.credit_amount = str(res["credit"])
     self.label.setText(self.credit_amount + '원')
     pass