久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

        <i id='DJAww'><tr id='DJAww'><dt id='DJAww'><q id='DJAww'><span id='DJAww'><b id='DJAww'><form id='DJAww'><ins id='DJAww'></ins><ul id='DJAww'></ul><sub id='DJAww'></sub></form><legend id='DJAww'></legend><bdo id='DJAww'><pre id='DJAww'><center id='DJAww'></center></pre></bdo></b><th id='DJAww'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='DJAww'><tfoot id='DJAww'></tfoot><dl id='DJAww'><fieldset id='DJAww'></fieldset></dl></div>

        <small id='DJAww'></small><noframes id='DJAww'>

        <legend id='DJAww'><style id='DJAww'><dir id='DJAww'><q id='DJAww'></q></dir></style></legend>

      1. <tfoot id='DJAww'></tfoot>
          <bdo id='DJAww'></bdo><ul id='DJAww'></ul>
      2. 如何顯示 PyQt 模式對話框并在關閉后從其控件中

        How can I show a PyQt modal dialog and get data out of its controls once its closed?(如何顯示 PyQt 模式對話框并在關閉后從其控件中獲取數據?)

        <small id='vfCYu'></small><noframes id='vfCYu'>

          <bdo id='vfCYu'></bdo><ul id='vfCYu'></ul>
          <legend id='vfCYu'><style id='vfCYu'><dir id='vfCYu'><q id='vfCYu'></q></dir></style></legend>
          1. <tfoot id='vfCYu'></tfoot>
          2. <i id='vfCYu'><tr id='vfCYu'><dt id='vfCYu'><q id='vfCYu'><span id='vfCYu'><b id='vfCYu'><form id='vfCYu'><ins id='vfCYu'></ins><ul id='vfCYu'></ul><sub id='vfCYu'></sub></form><legend id='vfCYu'></legend><bdo id='vfCYu'><pre id='vfCYu'><center id='vfCYu'></center></pre></bdo></b><th id='vfCYu'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='vfCYu'><tfoot id='vfCYu'></tfoot><dl id='vfCYu'><fieldset id='vfCYu'></fieldset></dl></div>
              <tbody id='vfCYu'></tbody>

                1. 本文介紹了如何顯示 PyQt 模式對話框并在關閉后從其控件中獲取數據?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  對于像 QInputDialog 這樣的內置對話框,我讀到我可以這樣做:

                  For a built-in dialog like QInputDialog, I've read that I can do this:

                  text, ok = QtGui.QInputDialog.getText(self, 'Input Dialog', 'Enter your name:')
                  

                  如何使用我在 Qt Designer 中自己設計的對話框來模擬這種行為?例如,我想做:

                  How can I emulate this behavior using a dialog that I design myself in Qt Designer? For instance, I would like to do:

                  my_date, my_time, ok = MyCustomDateTimeDialog.get_date_time(self)
                  

                  推薦答案

                  這是一個簡單的類,你可以用它來提示日期:

                  Here is simple class you can use to prompt for date:

                  class DateDialog(QDialog):
                      def __init__(self, parent = None):
                          super(DateDialog, self).__init__(parent)
                  
                          layout = QVBoxLayout(self)
                  
                          # nice widget for editing the date
                          self.datetime = QDateTimeEdit(self)
                          self.datetime.setCalendarPopup(True)
                          self.datetime.setDateTime(QDateTime.currentDateTime())
                          layout.addWidget(self.datetime)
                  
                          # OK and Cancel buttons
                          buttons = QDialogButtonBox(
                              QDialogButtonBox.Ok | QDialogButtonBox.Cancel,
                              Qt.Horizontal, self)
                          buttons.accepted.connect(self.accept)
                          buttons.rejected.connect(self.reject)
                          layout.addWidget(buttons)
                  
                      # get current date and time from the dialog
                      def dateTime(self):
                          return self.datetime.dateTime()
                  
                      # static method to create the dialog and return (date, time, accepted)
                      @staticmethod
                      def getDateTime(parent = None):
                          dialog = DateDialog(parent)
                          result = dialog.exec_()
                          date = dialog.dateTime()
                          return (date.date(), date.time(), result == QDialog.Accepted)
                  

                  并使用它:

                  date, time, ok = DateDialog.getDateTime()
                  

                  這篇關于如何顯示 PyQt 模式對話框并在關閉后從其控件中獲取數據?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  How to make a discord bot that gives roles in Python?(如何制作一個在 Python 中提供角色的不和諧機器人?)
                  Discord bot isn#39;t responding to commands(Discord 機器人沒有響應命令)
                  Can you Get the quot;About mequot; feature on Discord bot#39;s? (Discord.py)(你能得到“關于我嗎?Discord 機器人的功能?(不和諧.py))
                  message.channel.id Discord PY(message.channel.id Discord PY)
                  How do I host my discord.py bot on heroku?(如何在 heroku 上托管我的 discord.py 機器人?)
                  discord.py - Automaticaly Change an Role Color(discord.py - 自動更改角色顏色)

                        <i id='Vyy9f'><tr id='Vyy9f'><dt id='Vyy9f'><q id='Vyy9f'><span id='Vyy9f'><b id='Vyy9f'><form id='Vyy9f'><ins id='Vyy9f'></ins><ul id='Vyy9f'></ul><sub id='Vyy9f'></sub></form><legend id='Vyy9f'></legend><bdo id='Vyy9f'><pre id='Vyy9f'><center id='Vyy9f'></center></pre></bdo></b><th id='Vyy9f'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Vyy9f'><tfoot id='Vyy9f'></tfoot><dl id='Vyy9f'><fieldset id='Vyy9f'></fieldset></dl></div>
                        <legend id='Vyy9f'><style id='Vyy9f'><dir id='Vyy9f'><q id='Vyy9f'></q></dir></style></legend>
                          <tbody id='Vyy9f'></tbody>
                        <tfoot id='Vyy9f'></tfoot>

                          <bdo id='Vyy9f'></bdo><ul id='Vyy9f'></ul>

                            <small id='Vyy9f'></small><noframes id='Vyy9f'>

                            主站蜘蛛池模板: 欧美黄在线观看 | 国产一区二区不卡 | 亚洲三区视频 | av手机在线播放 | 91亚洲国产成人精品一区二三 | 99免费在线观看视频 | 亚洲精品一级 | 精品在线一区 | 美女在线视频一区二区三区 | 亚洲www啪成人一区二区 | 国产福利在线视频 | 欧美日韩精品一区 | 四虎影院久久 | 精品久久久久久亚洲精品 | 另类二区| 欧美一级电影免费 | 国产精品视频一二三区 | 99这里只有精品视频 | 一区二区蜜桃 | 天天操夜夜操 | 亚洲成av人片在线观看 | 日韩精品久久久久久 | 日本精品一区二区三区视频 | 午夜影视网| 久久国产精品久久久久久久久久 | 免费在线观看av片 | 国产91网址| 国产999精品久久久久久绿帽 | 日韩精品一区二区三区 | 91久久精品国产 | 亚洲精品久久久久久一区二区 | 久久成人一区二区三区 | 午夜精品久久久久久久99黑人 | 日韩电影中文字幕在线观看 | 一区二区三区久久 | 91精品国产综合久久久密闭 | 国产高清视频 | 久久9视频| 久久久久久国产精品免费免费狐狸 | 九九九视频精品 | 一级全黄少妇性色生活免费看 |