Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7706531
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:08:54+00:00 2026-06-01T00:08:54+00:00

I am a student programmer using Qt to build a GUI interface fro my

  • 0

I am a student programmer using Qt to build a GUI interface fro my company. I am currently building a reader table that reads in data and separates it appropriately based on file type. Anywho; when a certain file extension is selected I have a Message box display for selecting what type of data is in this file. Currently the message box shows all the buttons stacked from left to right and it looks kinda dumb. I want them to either stack from top to bottom of even better stack 2×2. I have been looking through QMessageBox documentation and cant seem to find a method to do this. I know that one must exist it seems i just need some help finding it. Currently my cod for this message box looks like this;

            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();

currently this windows looks like this:
enter image description here

so know you can see why I’d like to change the layout here. Thanks for reading my post! Thanks in advance for any help you can contribute to overcoming this challenge.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T00:08:56+00:00Added an answer on June 1, 2026 at 12:08 am

    To achieve that you will have to create your own dialog extending QDialog, use a QDialogButtonBox for your buttons layout and add it as a widget to your custom QDialog.

    Using QmessageBox won’t allow you to change the buttons orientation. And if you want a 2×2 display you will have to play a bit more with a combination of layouts (with two QDialogButtonBox).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently a student programmer using Qt to build a GUI inteface at
I am a student programmer using Qt to build a reader Table for my
I am a student programmer using Qt to build a GUI for work. I
I am a student programmer and I am using Qt to build a GUI
I'm a student programmer and I am using Qt to build some GUI applications
I am student programmer and I am using Qt to develop a GUI interface
Im a student programmer and Im using Qt to build a GUI for one
I am a student programmer currently designing a GUI for my company with Qt
I'm a student programmer and I am using Qt to build a GUI for
I'm a student programmer and I am using Qt to build a GUI application.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.