Qt Programming Language
-
@JonB said in Qt Programming Language:
@Annabelle
You wrote:Then it launched the Command Prompt.
It is probably in that Command Prompt window that I would expect the text of
Hello World!
to have been output. Is that possible?JAWS doesn't show anything in the Command Prompt. If the text was shown, I'd be able to read it with the left and right arrow keys.
-
@Annabelle said in Qt Programming Language:
JAWS doesn't show anything in the Command Prompt. If the text was shown, I'd be able to read it with the left and right arrow keys.
This user (KrolPolski) found that arrow keys don't work in the Command Prompt for JAWS, but another user (Graham87) described a workaround: https://www.reddit.com/r/Blind/comments/8zf1f1/using_a_command_prompt_with_jaws/
See if you can get JAWS to read something on the Command Prompt before it closes. The Command Prompt should contain the text, "Hello world!"
If you still have no luck with JAWS, does the Microsoft Narrator work?
-
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
JAWS doesn't show anything in the Command Prompt. If the text was shown, I'd be able to read it with the left and right arrow keys.
This user (KrolPolski) found that arrow keys don't work in the Command Prompt for JAWS, but another user (Graham87) described a workaround: https://www.reddit.com/r/Blind/comments/8zf1f1/using_a_command_prompt_with_jaws/
See if you can get JAWS to read something on the Command Prompt before it closes. The Command Prompt should contain the text, "Hello world!"
If you still have no luck with JAWS, does the Microsoft Narrator work?
I ran it again, and in the Command Prompt, I got:
"Hello World! Press any key to continue..."
What do I do next? -
What do I do next?
Well, that's it for "Hello World": you've done it! (And very well done!) You have written a program, compiled it, and run it successfully with the expected output.
What you do now is up to you :) If you mean you want to turn to Qt you'd have to install it, I don't know what you intended to do.
-
@JonB said in Qt Programming Language:
What do I do next?
Well, that's it for "Hello World": you've done it! (And very well done!) You have written a program, compiled it, and run it successfully with the expected output.
What you do now is up to you :) If you mean you want to turn to Qt you'd have to install it, I don't know what you intended to do.
I wonder if I could make Qt programs with Visual Studio. Or is that just for C++?
-
@Annabelle
You can integrate Visual Studio with Qt to develop programs, or you can use Qt Creator as your "IDE" (Integrated Development Environment). I don't know whether previous discussions have indicated a preference for which one for you. -
@JonB said in Qt Programming Language:
@Annabelle
You can integrate Visual Studio with Qt to develop programs, or you can use Qt Creator as your "IDE" (Integrated Development Environment). I don't know whether previous discussions have indicated a preference for which one for you.I think from what I've experienced so far, Visual Studio is the more accessible one for me. That being said, how would I make Qt programs with Visual Studio?
-
@Annabelle said in Qt Programming Language:
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
JAWS doesn't show anything in the Command Prompt. If the text was shown, I'd be able to read it with the left and right arrow keys.
This user (KrolPolski) found that arrow keys don't work in the Command Prompt for JAWS, but another user (Graham87) described a workaround: https://www.reddit.com/r/Blind/comments/8zf1f1/using_a_command_prompt_with_jaws/
See if you can get JAWS to read something on the Command Prompt before it closes. The Command Prompt should contain the text, "Hello world!"
If you still have no luck with JAWS, does the Microsoft Narrator work?
I ran it again, and in the Command Prompt, I got:
"Hello World! Press any key to continue..."Great! That means JAWS can read the outputs of your programs.
What do I do next?
Do you remember the plan? Your task is to learn the basics of C++ first, without Qt.
First, try to modify the code to make the Command Prompt say something other than "Hello world!". For example, try to make it say, "Hi Annabelle!"
After that, continue working through the learncpp.com tutorial.
@Annabelle said in Qt Programming Language:
I wonder if I could make Qt programs with Visual Studio. Or is that just for C++?
C++ is a programming language, while Qt is a library for C++. You use the C++ language to write programs with the Qt library.
This is why learning the basics of C++ is an important step to achieve your goal of making Qt programs.
-
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
JAWS doesn't show anything in the Command Prompt. If the text was shown, I'd be able to read it with the left and right arrow keys.
This user (KrolPolski) found that arrow keys don't work in the Command Prompt for JAWS, but another user (Graham87) described a workaround: https://www.reddit.com/r/Blind/comments/8zf1f1/using_a_command_prompt_with_jaws/
See if you can get JAWS to read something on the Command Prompt before it closes. The Command Prompt should contain the text, "Hello world!"
If you still have no luck with JAWS, does the Microsoft Narrator work?
I ran it again, and in the Command Prompt, I got:
"Hello World! Press any key to continue..."Great! That means JAWS can read the outputs of your programs.
What do I do next?
Do you remember the plan? Your task is to learn the basics of C++ first, without Qt.
First, try to modify the code to make the Command Prompt say something other than "Hello world!". For example, try to make it say, "Hi Annabelle!"
After that, continue working through the learncpp.com tutorial.
@Annabelle said in Qt Programming Language:
I wonder if I could make Qt programs with Visual Studio. Or is that just for C++?
C++ is a programming language, while Qt is a library for C++. You use the C++ language to write programs with the Qt library.
This is why learning the basics of C++ is an important step to achieve your goal of making Qt programs.
Would I put "Hi Annabelle!", in the spot of code where it would usually say "Hello World"? I'm confused!
-
@Annabelle said in Qt Programming Language:
Would I put "Hi Annabelle!", in the spot of code where it would usually say "Hello World"? I'm confused!
Yes indeed! You should not be confused.
I had not realised you were working through a learn C++ tutorial. That is an excellent idea. Moving onto Qt now would be a huge step --- you have to learn to walk before you can run!
@JKSH is getting you to just modify some existing, working code to do something slightly different. That happens all the time in programming.
Get it working with the new message instead of the present one. Then, how about making it output two lines instead of one? After it has said the new
Hi Annabelle!
, make it sayBye bye now
. That is going to require a secondstd::cout
line after the existing one, isn't it? You can either type that in from scratch, or to avoid typing you could copy & paste your existing line and then change the string in the middle of the line. I don't know how easily your interface allows you to copy & paste, it's up to you. -
@Annabelle said in Qt Programming Language:
Would I put "Hi Annabelle!", in the spot of code where it would usually say "Hello World"? I'm confused!
Be adventurous and give it a try!
-
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
Would I put "Hi Annabelle!", in the spot of code where it would usually say "Hello World"? I'm confused!
Be adventurous and give it a try!
I ended up having to make a separate project, as when I put "Hi Annabelle!" and "Bye now." into the original project, it still displayed "Hello World!" in the resulting Command Prompt.
-
@Annabelle said in Qt Programming Language:
I ended up having to make a separate project, as when I put "Hi Annabelle!" and "Bye now." into the original project, it still displayed "Hello World!" in the resulting Command Prompt.
Try to get your updated code to affect what's shown in the Command Prompt without making a separate project. If you are able to do this, you will save yourself lots of time in future exercises or projects.
After you edit the code in your original project, remember to save your changes, then rebuild and re-run your program.
-
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
I ended up having to make a separate project, as when I put "Hi Annabelle!" and "Bye now." into the original project, it still displayed "Hello World!" in the resulting Command Prompt.
Try to get your updated code to affect what's shown in the Command Prompt without making a separate project. If you are able to do this, you will save yourself lots of time in future exercises or projects.
After you edit the code in your original project, remember to save your changes, then rebuild and re-run your program.
That's what I did originally, and unfortunately the resulting text in the command prompt didn't change, it still said "Hello World!".
-
@Annabelle said in Qt Programming Language:
Try to get your updated code to affect what's shown in the Command Prompt without making a separate project. If you are able to do this, you will save yourself lots of time in future exercises or projects.
After you edit the code in your original project, remember to save your changes, then rebuild and re-run your program.
That's what I did originally, and unfortunately the resulting text in the command prompt didn't change, it still said "Hello World!".
To clarify: Did you close the original Command Prompt window before editing, saving, rebuilding, and rerunning your program?
-
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
Try to get your updated code to affect what's shown in the Command Prompt without making a separate project. If you are able to do this, you will save yourself lots of time in future exercises or projects.
After you edit the code in your original project, remember to save your changes, then rebuild and re-run your program.
That's what I did originally, and unfortunately the resulting text in the command prompt didn't change, it still said "Hello World!".
To clarify: Did you close the original Command Prompt window before editing, saving, rebuilding, and rerunning your program?
Yes.
-
@Annabelle said in Qt Programming Language:
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
Try to get your updated code to affect what's shown in the Command Prompt without making a separate project. If you are able to do this, you will save yourself lots of time in future exercises or projects.
After you edit the code in your original project, remember to save your changes, then rebuild and re-run your program.
That's what I did originally, and unfortunately the resulting text in the command prompt didn't change, it still said "Hello World!".
To clarify: Did you close the original Command Prompt window before editing, saving, rebuilding, and rerunning your program?
Yes.
Hmm, that is strange. However, without access to your PC, it's hard to tell what's wrong.
In any case, don't let yourself be hindered by little issues like this. Be proactive, and keep working your way through the tutorials.
-
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
@JKSH said in Qt Programming Language:
@Annabelle said in Qt Programming Language:
Try to get your updated code to affect what's shown in the Command Prompt without making a separate project. If you are able to do this, you will save yourself lots of time in future exercises or projects.
After you edit the code in your original project, remember to save your changes, then rebuild and re-run your program.
That's what I did originally, and unfortunately the resulting text in the command prompt didn't change, it still said "Hello World!".
To clarify: Did you close the original Command Prompt window before editing, saving, rebuilding, and rerunning your program?
Yes.
Hmm, that is strange. However, without access to your PC, it's hard to tell what's wrong.
In any case, don't let yourself be hindered by little issues like this. Be proactive, and keep working your way through the tutorials.
I have Teamviewer, if you'd like to access it that way. Would you want my phone number for that method?
-
@Annabelle said in Qt Programming Language:
I ended up having to make a separate project, as when I put "Hi Annabelle!" and "Bye now." into the original project, it still displayed "Hello World!" in the resulting Command Prompt.
Annabelle, if you think about this logically that cannot be the right approach. You don't/must not have to create a new project in order to alter something like the output from a piece of code you have already written.
Why don't you go back now to the original project and have a stab at making the edits again? If that still produces the wrong output as you said, paste the code and we'll have a look at it.