GUI App

GUI App

Python | GUIアプリで文字を中央に表示する方法

PythonのGUIアプリで文字を中央に表示する方法を説明する。■結論 setAlignment(Qt.AlignmentFlag.AlignCenter)を使う。
GUI App

Python | PyQt5からPyQt6へ移行(setAlignment編)AttributeError: type object ‘Qt’ has no attribute ‘AlignCenter’

AttributeError: type object 'Qt' has no attribute 'AlignCenter'の対処方法を説明する。■結論 [PyQt5]:setAlignment(Qt.AlignCenter) [PyQt6]:setAlignment(Qt.AlignmentFlag.AlignCenter)
GUI App

Python | GUIアプリ作成方法(Mac & Windows)

Python GUIアプリを作成する方法を説明する。■完成イメージ なまえとしょくぎょうを入れてボタンをおすと結果が表示されるアプリを作る。MacでもWindowsでも同じコードを書けば同じGUIアプリができる。
GUI App

Python | GUIアプリのclass初期化方法

Python GUIアプリのclass初期化方法を説明する。■def __init__(self, parent=None):の意味 parentはUIの親子関係を設定するもの。■super().__init__(parent)の意味 super()は親のこと。
GUI App

Python | PyQt5からPyQt6へ移行(PyQtGraph編)DeprecationWarning: GraphicsWindow is deprecated, use GraphicsLayoutWidget instead

GraphicsWindow is deprecated, use GraphicsLayoutWidget insteadの対処方法を説明する。■結論 [PyQt5]:GraphicsWindow() [PyQt6]:GraphicsLayoutWidget(show=True)
GUI App

Python | PyQt5からPyQt6へ移行(app.exec()編)AttributeError: ’QApplication’ object has no attribute ’exec_’

’QApplication’ object has no attribute ’exec_’の対処方法を説明する。■結論 [PyQt5]:app.exec_() [PyQt6]:app.exec()