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 7056635
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:53:26+00:00 2026-05-28T03:53:26+00:00

I am starting a Qt course this semester. Having looked at the official documentation

  • 0

I am starting a Qt course this semester. Having looked at the official documentation as well as some on line examples I am confused by the parameter lists of the QInputDialog and QMessagebox classes.

Is there anywhere where one could find some decent info as to what to pass when creating the class / form?

Right now I have this by trial error

tempC = QInputDialog::getDouble(0, "Temperature Converter",
                                "Enter the temperature in Celsius to convert to Fahrenheit:", 1);

Looking at the official docs doesn’t help a lot either (at least not for me yet) as it says this:

double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"),
                                   tr("Amount:"), 37.56, -10000, 10000, 2, &ok);

as an example.

Any links will be much appreciated.

  • 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-05-28T03:53:26+00:00Added an answer on May 28, 2026 at 3:53 am
    double d = QInputDialog::getDouble(this, tr("QInputDialog::getDouble()"),
                                       tr("Amount:"), 37.56, -10000, 10000, 2, &ok);
    
    • A dialog will popup with parent the widget in which you are using this function. (this)
    • The dialog’s title will be QInputDialog::getDouble() (tr is used in order to translate this string if you want using QtLinguist)
    • Inside the dialog will be a double spibox and a label
    • The label’s string will be Amount:
    • The default value of the spinbox (what you see when the dialog popups) will be 37.56
    • The minimum value will be -10000 (you will not be able to set a value less than this)
    • The maximum value will be 10000 (you will not be able to set a value greater than this)
    • Two decimal point will be displayed, eg 3.478 will be displayed as 3.48.
    • If the user presses the Ok button then the ok argument will be set to true, otherwise it will be set to false

    Check the documentation which includes an example for more details.

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

Sidebar

Related Questions

Well this is embarrassing ... I'm starting to play with the Eclipse Memory Analyzer
I'm having trouble solving this problem. I have to find all simple paths starting
This semester, I took a course in computer graphics at my University. At the
This is just crazy, I am starting on PowerShell. And of course I need
I'm starting a computer graphics course, and I have to choose a language. Choices
I'm just starting to learn Verilog on my own after taking a course on
Starting with a recent new version of ADT, I've noticed this new attribute on
Starting a new rails project and we have a well-thought-out color palette, and want
i have been following this course in youtube and it was talking about how
I am just starting on MVC so this should be an easy question to

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.