Last active
July 26, 2016 10:44
-
-
Save sakura-crowd/502e753adc347249cef9ac78da9703d4 to your computer and use it in GitHub Desktop.
Qt Designer の使い方 ref: http://qiita.com/sakura-crowd/items/13cf2e1dc73b96508314
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ui ファイルを読み込み、 ui オブジェクトを作成、表示 | |
loader = QtUiTools.QUiLoader() | |
self.ui = loader.load("XXX.ui") | |
self.ui.show() | |
# アクションのイベントハンドラを設定 | |
self.ui.actionMenu.triggered.connect(self.onToolbarMenu) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide import QtUiTools | |
# XXX_rc.py は XXX.qrc を変換したもの。qrcを使った ui を読み込む場合に必要。 | |
import XXX_rc.py | |
# ui ファイルを読み込み、 ui オブジェクトを作成 | |
loader = QtUiTools.QUiLoader() | |
ui = loader.load("XXX.ui") | |
ui.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment