Configure script says C++14 support is not available
-
@DragonOsman said in Configure script says C++14 support is not available:
If I install the binaries directly, will they give me WebAssembly support out of the box? In the documentation for Qt5 for WebAssembly, it says to install the binaries and mentions the option to build it from sources as an alternative. Is it okay to assume that this means the binaries also have support for WebAssembly? I'm trying to install version 5.13.1 of Qt.
You can choose the WebAssembly binaries with the Maintenance tool or online installer for Qt 5.13.1
You will still have to use the commandline to build, until proper support is implemented in QtCreator (soon).
-
I installed the binaries using the online installer for v5.13.1, but didn't see an option for WebAssembly. How can I get to the Maintenance tool?
-
@DragonOsman said in Configure script says C++14 support is not available:
How can I get to the Maintenance tool?
It resides in your Qt installation, e.g.
C:\Qt
.Regards
-
I found the Maintenance Tool and am trying to use it, but there's really nothing there about WebAssembly. Will I get it if I install the "Archive" component along with Qt version 5.13.1? Or did I install the wrong version?
Could it be that WebAssembly support isn't available to those who install Qt with an account that has an open source license attached to it? Because that's what I have. It'd be great if my installation of Qt already has Wasm support included by default, though.
Edit: Actually I can see a WebAssembly Kit mentioned in the Kit Selection part of the project creation process in Qt Creator. It's just that that it couldn't start clangbackend.exe for some reason, when the IDE initially started up. And it also reported that the C and C++ compilers are in different locations and that the C compiler may not work. I'll mainly use C++, but this is still a little worrisome.
-
I'd like some help with what I said in the above message, but aside from that I think this issue is pretty much solved.
Though I'd like to know what modules to build and what flags or commands to pass when I do try to build Qt from source again. If I do. Thanks.
-
@DragonOsman Take a look at this https://doc.qt.io/qt-5/build-sources.html
-
I installed Qt version 5.13.1 using the online installer and I have Wasm support out of the box (I don't know what libraries to link against, though, so I can't build anything yet--I did manage find the library directory though). I'm just having issues with building the Notepad app that the first Getting Started tutorial on the Qt website talks about. And I also don't know how to get Qt Creator to detect my VS 2019 installation (it's in the default location by the way). It only uses up to VS 2017 and I only have the Built Tools for that version. I don't have the actual IDE along with that. Qt Creator tries to set the environment to x86 for VS 2017 but it can't so it shows an error about it.
Edit: For some reason, I can't set the layout for the Text Edit widget anymore in Qt Creator. I could before when I first started using it. I don't know what happened. I'll see if I can do a System Restore to fix it maybe.
Edit2: Okay, never mind. I can't go back to that point. I hope there are other ways to fix this.
-
@DragonOsman said in Configure script says C++14 support is not available:
I also don't know how to get Qt Creator to detect my VS 2019 installation (it's in the default location by the way). It only uses up to VS 2017 and I only have the Built Tools for that version.
Visual Studio 2019 contained a critical bug which made it unusable for many graphical calculations. It was only fixed yesterday: https://developercommunity.visualstudio.com/content/problem/547684/visual-studio-20191602-generator-incorrect-code-wi.html I recommend you upgrade to the latest version as soon as possible.
The next version of Qt and Qt Creator can now support VS 2019 properly.
I don't have the actual IDE along with that. Qt Creator tries to set the environment to x86 for VS 2017 but it can't so it shows an error about it.
You shouldn't need the Visual Studio IDE. The Build Tools should work fine (for Desktop builds, at least... I haven't checked WASM)
Also, libraries built with VS 2017 can be used with the VS 2019 compiler.
Create a new Kit that uses the Qt libraries for VS 2017 but select your VS 2019 compiler: https://doc.qt.io/qtcreator/creator-targets.html
-
I updated my VS 2019 IDE just yesterday. I hope I can make it work now.
When following the Getting Started tutorial for making a Notepad app, I encountered an issue where when I add the menu items it says to add, I don't get five new lines appear in the Action Editor like the tutorial says I should. I had to click on them to get a dropdown menu with another "Type Here" where I typed the names of the menu items again. But this gave me one action for each menu, so I have six now instead of five. Did I do something wrong?
When I right click on the actions, click on "Go to slot" and then click "triggered", the function name I get also looks different. For example, the full function signature for the "New" action is:
void Notepad::on_actionNew_triggered()
. On the tutorial it hasvoid Notepad::newDocument()
. I'm a bit confused.And I also have an error in
Notepad::on_actionOpen_triggered()
that says thatQFileDialog
is an undeclared identifier. The error is from the MSVC 2017 compiler.How do I define the function for printing a file after enabling support for that in the .pro file? The tutorial talks about it but doesn't show the code. I'll try to define it myself and ask about it here if I come across a problem. I'll also define the functions that use
QFileDialog
for now but I'll wait for word from you guys on how to fix the error message before I try to build the project. Thanks in advance.Edit: The tutorial for some reason doesn't say to do this; I added
#include
lines forQFileDialog
andQFile
below the ones fornotepad.h
andnotepad_ui.h
. The error of course went away with that.Edit2: Okay, how do I get the buttons and stuff for these actions?
connect(ui->actionCopy, &QAction::triggered, this, &Notepad::copy); connect(ui->actionCut, &QAction::triggered, this, &Notepad::cut); connect(ui->actionPaste, &QAction::triggered, this, &Notepad::paste); connect(ui->actionUndo, &QAction::triggered, this, &Notepad::undo); connect(ui->actionRedo, &QAction::triggered, this, &Notepad::redo); connect(ui->actionFont, &QAction::triggered, this, &Notepad::selectFont); connect(ui->actionBold, &QAction::triggered, this, &Notepad::setFontBold); connect(ui->actionUnderline, &QAction::triggered, this, &Notepad::setFontUnderline); connect(ui->actionItalic, &QAction::triggered, this, &Notepad::setFontItalic); connect(ui->actionAbout, &QAction::triggered, this, &Notepad::about);
And how do I add the functionality for them? It seems like an advanced topic, but still.
Edit3:
Note: I'm using C++17 and braced initialization.In the method
Notepad::on_actionPrint_triggered
, I have this:QPrinter printer{QPrintDialog};
but I don't know what method of
QPrintDialog
to use here and the tutorial isn't clear about it either. Thanks in advance for any help. -
This post is deleted!
-
Okay, never mind; I just remembered that those other action functions are already shown earlier on in the tutorial. I'll just look at those. What about the menu items/buttons for selecting a font, and for "undo", "redo", "cut", "copy" and "paste". How do I make those? The same as for the others or something different?
-
@DragonOsman said in Configure script says C++14 support is not available:
What about the menu items/buttons for selecting a font, and for "undo", "redo", "cut", "copy" and "paste". How do I make those? The same as for the others or something different?
Are you doing this tutorial?: https://doc.qt.io/qt-5/qtwidgets-tutorials-notepad-example.html I think that tutorial needs lots of improvement.
But anyway, see https://doc.qt.io/qt-5/designer-creating-mainwindows.html# for creating menus
-
I managed to get it working. I just need to know how I can get Emscripten to generate the
notepad_ui.h
header file from theuic
file. For now I built it from within Qt Creator itself using the MSVC 2017 compiler, but I do want to know how to do it with Emscripten from the command line.I also created the menus in such a way that clicking them gives you a dropdown with one item with the same text as the button where you have to click the dropdown to perform the action. Is there a way to do it without needing to create the dropdown?
Also, how do I change the configuration from Debug to Release?
Edit: I changed it to Release mode just fine so never mind that.
Anyway, although I can build it just fine in Qt Creator, trying it with Emscripten on the command line keeps failing. I get exceptions from the Emscripten script. If Qt developers can help with this, maybe I should open a new issue asking for help on building Qt apps to Wasm.
And for some reason, when running the app, I have to choose a font twice from the font selection dialog box when I click on the menu button for selecting a font. I also don't understand why it won't just create an action in Action Editor the moment I create a menu item. Why do I have to click on the "Type here" that comes up when I click on that and create another menu item there for the same action for it to work?