私はQtを使用して会社のGUIインターフェイスを構築する学生プログラマーです。私は現在、データを読み込み、ファイルの種類に基づいてデータを適切に分離するリーダーテーブルを作成しています。誰でも; 特定のファイル拡張子を選択すると、このファイルに含まれるデータの種類を選択するためのメッセージボックスが表示されます。現在、メッセージボックスには、左から右に積み重ねられたすべてのボタンが表示されており、ちょっとばかげているように見えます。私は彼らにさらに良いスタック2x2の上から下にスタックしてもらいたいです。QMessageBoxのドキュメントを調べていましたが、これを行う方法が見つからないようです。私はそれが存在しなければならないことを知っています、それを見つけるのに助けが必要なようです。現在、このメッセージボックスのタラは次のようになっています。
QMessageBox templateSelectorWindow;
QPushButton * pressureBC =templateSelectorWindow.addButton("Pressure Boundry Condition", QMessageBox::AcceptRole);
QPushButton * flowBC = templateSelectorWindow.addButton("Flow Boundry Condition", QMessageBox::AcceptRole);
QPushButton * massFlowBC = templateSelectorWindow.addButton("Mass Flow Boundry Condition", QMessageBox::AcceptRole);
QPushButton * thermalWallBC = templateSelectorWindow.addButton("Thermal Wall Boundry Condition", QMessageBox::AcceptRole);
QPushButton * cancelButton = overwriteWarning.addButton("Cancel", QMessageBox::RejectRole);
templateSelectorWindow.setWindowTitle("Input File Type");
templateSelectorWindow.setText("Input Files Require You Select The Input File Type:");
templateSelectorWindow.setInformativeText("Please select the the input type from the following");
templateSelectorWindow.exec();
現在、このウィンドウは次のようになっています。
ここでレイアウトを変更したい理由がわかります。私の投稿を読んでくれてありがとう!この課題の克服に貢献できる支援を事前に感謝します。