How do I use Qt in Visual Stuidio Code operating system Linux Mint 18?
Marketplace doesnt exist extension for Qt.
Maybe anyone knows more!
UPD.
I meant that by type Qt AddIn
You should give a chance for this extension: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
With this, you can configure include paths for better IntelliSense results.
Configuring includePath
One way to configure e.g the QtCore module.
Ctrl + Shift + p to open command palette
Search for: C/Cpp: Edit Configurations
You should have a new tab called: c_cpp_properties.json
In configurations array you should edit the Linux section
Add your paths in the includePath setting e.g: /usr/include/x86_64-linux-gnu/qt5/QtCore
For more check this: https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/Getting%20started.md
IntelliSense engines
We recommend using the "Default" engine for the best IntelliSense experience. However, it is possible to explicitly choose the IntelliSense engine by editing your user or workspace settings. The setting you should modify is C_Cpp.intelliSenseEngine
Default - Visual Studio's IntelliSense engine, which is the default engine that provides semantic-aware IntelliSense features
Tag Parser - the "fuzzy" IntelliSense engine that provides quick but "fuzzy" results, is used to provide the fallback experience if the default engine is
More details about it:
https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/IntelliSense%20engine.md
The methods for adding Qt headers to the cpptools extension have changed since the last answer. Options for doing so now include:
Automatically adding a found Qt header path by clicking on the light bulb above an IntelliSense error and selecting Add to "includePaths"...
Manually adding the Qt header paths to the settings UI, from the command palette, via C/Cpp: Edit Configurations (UI)
Manually adding the Qt header paths to the settings JSON file, from the command palette, via C/Cpp: Edit Configurations (JSON)
More info in this page of the new documentation.
You can use CMake with CMake tools extension.
Just create a CMake project in vscode and add qt framework to your project in CMakeLists.txt.
Link to the extension - https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools
Use CMake with qt - https://doc.qt.io/qt-5/cmake-get-started.html
Apart from the C++ extension (cpptools) mentioned in other answers, there are also extensions for Qt Quick that add support for the QML language. The QML Syntax/Tools extension adds syntax highlighting, auto-completion, and also allows to run and test your Qt Quick app using QML Hot Reload: Visual Studio Code Extension for Qt Quick
Related
Is it possible to configure the foreground/background colours of the WebStorm Project Tool Window? I have been unable to find the settings.
No, as it's defined in UI theme. UI themes (used for dialogs, tool windows, etc.) are Java Look&Feels. This is a standard way to style Swing applications. As such, they are hardcoded and can't be changed easily.
Note that it's technically possible to install any third-party L&F into JVM and use it in WebStorm ( see http://docs.oracle.com/javase/tutorial/uiswing/index.html, https://weblogs.java.net/blog/kirillcool/archive/2005/08/intellij_idea_5.html for instructions). Custom themes can also be implemented as plugins, like Material UI and Afterglow Theme - you can give them a try.
Note that we’re working on a feature allowing themes customization in IntelliJ Platform. Please follow IDEA-132299 to get updates.
Maybe this question has been done before but I can not find anything.
I would like to know what steps to follow so that Visual Studio Code can show the autocomplete window that shows Rust methods and such, for example when using ctrl+space (In many commons, editors) What I see is that it works for std but not for gtk-rs.
I was wondering if I would have to tell you in some way how to find the files or something like that.
I do not know if this will depend on each editor or all have some specific files included, my IDE is Visual Studio Code.
...you forgot to include the extensions that you have installed
kalitaalexey
Rust for Visual Studio Code
Rust Language Server integration.
Autocompletion (via racer or RLS).
Go To Definition (via racer or RLS).
Go To Symbol (via rustsym or RLS).
Code formatting (via rustfmt).
Code Snippets.
//..
Although there could be many possible causes of a problem with the Rust extension in Visual Studio Code, the following steps should help anyone with issues of this kind:
Do not use the old extension "Rusty Code", since it's no longer maintained. Instead, you have two options:
rust-analyzer provides by far the best Rust language support and is already part of the Rust organization. This is the recommended choice today.
rust-lang.rust is an older extension developed by an official Rust team and is focused on Rust Language Server (RLS) integration. It is not as powerful.
The kalitaalexey.vscode-rust extension was forked from Rusty Code to make it more stable, but that one too eventually lost maintenance.
When using RLS, you might need to build your project so that dependencies are downloaded and compiled locally, thus enabling the extension to retrieve additional information about them.
It's always worth making sure that the extension is up to date and properly configured. Update the extension, and check out the respective documentation for instructions on how to make it work.
Check the status bar. If something is wrong, it should tell you so. Open the extension task's output window for error messages. If something still isn't right, try reloading your window.
If there's still a problem after these steps, it might actually be a bug, which should be reported.
For me solution was to use Rust Analyzer extension https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer instead of rust-lang.rust https://marketplace.visualstudio.com/items?itemName=rust-lang.rust
If you're just starting with Rust and VSCode, and want to enable autocomplete, this is what I did (Novemeber 2021):
Install Rust extension in VSCode
Open root folder of you existing Rust project(or create new) in VSCode (and select "trust workspace" if asked)
Open src/main.rs, now in lower right corner VSCode will ask you to install some components, click yes and it will install both Rust Language Server and Rust Analyzer
Autocomplete should now work with CTRL+SPACE
Before trying out E_net4's solutions, make sure you are running your Rust project from root. (same directory as Cargo.toml)
I was running :
-app
- src
- Cargo.toml
-app2
- src
- Cargo.toml
As my workspace root.
For me, the answer was to install rust via rustup rather than through Home Brew.
Install rust via Rustup
Install the rust-analyzer extension
Also ensure that the workspace is trusted in VS Code.
I installed cocos2d-x-v3.6 and want to use it with an kubuntu repository version of eclipse (v3.8).
Although I added the path to cocos to the project's 'Path and Libraries > Includes' settings, I get a lot of errors of the sort:
Method '...' could not be resolved.
Function '...' could not be resolved.
Type '...' could not be resolved.
This is already true for the example code, see pictures.
This seems to be the case for mostly functions/variables in cocos namespaces, because basic classes, like 'Scene' are recognized.
What do I have to change in my settings so that also the members for this third-party framework are recognized?
Got it.
I started from scratch, installing cocos and all dependencies following these instructions - including android setup. (Before that, I followed the linux instructions and tried eclipse on that.)
I then used the cocos command line tool to build a new app skeleton, as described here.
Afterwards, I imported the proj.android subfolder into eclipse as an android project, as is described here for the cpp-tests example project shipped with cocos2d-x. (Importing libcocos2dx seemed not to be necessary at this point.)
All symbols, functions, methods where resolved by eclipse.
I had a look at the C++ Path and Libraries > Includes settings and there was a lot going on, many cocos subfolder are referenced.
However, autocompletion was still not working. I checked all checkboxes in the preferences at C++ or Java > Editor > Content Assist > Advanced and this did the trick, see screenshots.
I've been using CMAKE recently on Linux and Windows and I really like it. Its a great way of spinning up a project and organizing your builds. There are just a few things that are bugging me and I'm hoping to get help here.
Visual Studio Settings
Everytime CMAKE generates a project it will be a fresh solution and will not maintain any of the settings you applied to the Visual Studio project. I know that many things such as CMAKE_CXX_FLAGS, etc can change the properties. But what if I want to change settings such as "Suppress Startup Banner", "Environment", Enabling Microsoft Symbol Server, Enabling Native Code Debugging. How do I force CMAKE to set the options I want for fields like these?
Combining Debug/Release/Etc into one solution
It seems that with CMAKE you have to do separate generations for Debug/Release/etc. But in typical manually created Visual Studio projects you can combine the profiles and just change a project setting to get your new settings. Is it possible to generate a single solution file from CMAKE?
Okay so I scoured the CMAKE boards as well. Here are the answers I found.
Visual Studio Settings
For this one CMAKE can't modify the *.user files at all. However what was proposed was to make a user file template and then use CMAKE to supply all the paths and such that you are concerned with. This worked very well for me.
Combining Debug/Release/Etc into one solution
To change various settings on a per configuration basis. It seems like it is best to use fields like CMAKE_CXX_FLAGS_ and most importantly generator expressions. Generator expressions allow you to test for the build type and then generate whatever include, libraries, etc that you need.
Take a look at "Generator Expressions" here
I am currently using Qt Creator on Ubuntu Linux 12.10, and I have just started a Qt GUI application. When I click the design tab, I come to this screen:
As you can see, the Build and Run buttons on the bottom left are greyed out, and I don't understand why. I have searched across the web already, and have found nothing. Can anybody give me a clue as to why this is happening? Have I done something wrong?
My QT Creator version is:
Qt Creator 2.5.2
Based on Qt 4.8.2 (64 bit)
Built on Aug 19 2012 at 15:28:17
The only reason that I switched to Qt Creator is that Qt Designer cannot build applications, or edit their source code. Are the two meant to be used together? If so, how?
You are in the "design" realm, goto the "edit" or "debug" pane.
By looking at the little computer-shaped icon, just above the run, debug and build buttons on the bottom left corner, it seems to me that either you may have not set up a version of the Qt properly, or you haven't selected one at all. Therefore no compilation is possible
If you have installed the Qt Libraries, then you will need to "add" them to the QtCreator properteies.
In QtCreator go to Tools->Options-> Qt (or Qt Versions) and add a valid version of the qt libraries by selecting the path to the appropriate qmake.
If you are still having issues, I would recommend installing the Nokia-QtSDK, as it bundles the Qt libraries for different platforms (Desktop, Meego, Symbian, etc.) and it requires no extra set up.
Looking at the title bar of Qt Creator it looks like you only created (or opened) a .ui file. To compile something you need a project (a .pro file). Click File -> New and choose Application -> Qt Gui Application.
Check whether you have configured the tool chains required. You will need to provide paths for gcc compiler and qmake for building applications from Qt Creator. Check the settings in Tools->Preferences.