私はPySideでインターフェースを書いていますが、別のアクションが実行されるまで、インターフェースのいくつかの要素をグレー表示/非表示/アクセス不可にしたいです(たとえば、ファイルがロードされるまでファイル内の単語を数えても意味がありません)私はこれが可能であるべきだと思っていますが、方法を見つけることができないようです。
たとえば、次のメニューを作成します。
# We create the actions for the edit menu
countAction = QtGui.QAction(QtGui.QIcon('exit.png'), '&Count', self)
countAction.setShortcut('Ctrl+C')
countAction.setStatusTip('Counts the points in the current point cloud')
#openAction.triggered.connect(self.close)
# We create the menus
editMenu = menuBar.addMenu('&Edit')
# We add the actions to the edit menu
editMenu.addAction(countAction)
特定のイベント (ファイルの読み込み) が発生するまで、このメニュー、および後でボタンとテキスト フィールドにアクセスできないようにするにはどうすればよいですか?