This is a question I've been wondering about for a long time.
How do you create an Interface for your program ?
It seems to much of a pain to position form controls and buttons using just code.
I'm looking for something similar to Visual Basic where you can drag and drop controls onto the window. But, I want to do this for applications written in C++.
Can It be done with compilers like MinGW on Eclipse ?
If you don't want to go the Qt route you can use ResEdit which is freeware. It will produce Win32 friendly .rc files that can be built with the MinGW resource compiler and used in Win32 applications.
There are some C++ Win32 wrapper libraries available though I'm not aware of any that are nearly as mature as Qt. I believe WinxGui is a port of WTL (or at least claims to be compatible with WTL) for GCC. It doesn't look like there has been much activity on the project site for a few years however.
What you're searching for is called Qt, both Eclipse and MinGW friendly.
Check out this nice article.
Qt toolkit is written in C++. So you can use it to develop GUI. It also comes with Qt Designer and Qt Creator IDE and tools.
Qt Reference Documentation
Qt Designer Manual
Qt Creator IDE and tools
And you can use MinGW to compile the code. You don't need to download MInGW separately. When installing Qt toolkik, it asks if you want to download MInGW also, just say yes to it. It will then download the correct version of MInGW itself.
The 1.7 GB download you look at is probably the full Qt SDK. This is not just Qt and documentation, but also includes the Qt Creator IDE with the Qt Designer "Form builder", the MinGW compiler, debugger, examples, demos, and some other stuff. There's also an "online installer" that allows you to select the packages you want before downloading everything. That's probably what I'd use if I were starting from scratch on Windows.
Related
So I do know C++ fairly well, I have used it and C for the past year in college. I'm trying to make an application with a GUI that needs a simple input box and easily customizable windows. The main focus of the project however is a lot of backend processing, I just need a GUI for the user. Is there a place where I can just learn the quick basics of QT? Also for some reason I can't get QT to work on Visual Studio 2019.
I get this error:
When I go to input the version, it doesn't actually save when I click OK.
In Manutention Tool you should download these Qt components marked as MSVC or UWP:
A MinGW build of Qt will probably work only with CLion and Qt Creator
And don't download the latest Qt, because VS doesn't work well with them.
I want to create graphical application (drawing and moving squares and so) using C++. I was suggested to use Qt library for this. I am windows user and I use Visual Studio 2013 for developing C++ (console) apps. So I typed Qt download into google hoping to find some package of DLLs, libs, headers or something like that so I could include headers and link libraries with my code. But all I found was IDE Qt Creator (which I do not want) and Qt Visual Studio plugin (which I downloaded, but it still requires whole IDE to work). So my question is - How can I develop graphical application (no forms, just "canvas" to draw on with some mouse/keyboard support) using Qt library, C++ language and Visual Studio IDE, without requirement of downloading tons of GBs for IDE or plugins I do not want, with insurance that application would be easily deployable on most common operating systems.
The reason I do not want Qt creator IDE is simple -- There is a chance for this to be semester project and will be reviewed by teacher without any extra IDEs. (I'll send him just VS project/generated Makefile and Qt libraries with headers)
Thanks for clarification.
The short answer is: you cannot. You need Qt SDK, which comes with Qt Creator.
Qt comes with qmake build system and it does not require any IDE to compile and run the application. You can write in any IDE you want and compile anywhere, where Qt SDK and compiler is available.
If you want to provide the application to your teacher, he must have Qt SDK too to compile it. There is no way around this. And better test the application in the target environment. Writing portable applications is not a trivial task - if you hardcode paths like C:\QtSDK\path\to\something, there is little chance to run it under Linux without any changes.
If you cannot expect any SDK on a teacher's computer, you have few options:
convince her to install necessary tools
ask her what tools are permitted and stick with them
bring your own computer for final evaluation
I'm a C++ developer and I would like to develop applications for OSX and IOS with my Mac.
I'd like to use Xcode to achieve these goals but apparently the best solution (that involves C++) is Qt Creator. (Let me know if I'm wrong)
Can I use the free version of QT Creator (community - no license fee) to code in C++ for iOS/OSX and publish my apps on the Apple Store or do I need the indie mobile license?
Can QT be integrated in Xcode?
Thank you
I'm just getting into OS X and iOS development using Qt 5.3.2. It looks like that you use Qt Creator to create an iOS (or OS X) project. Then, Qt Creator makes use of Xcode for the build.
I've successfully created a OS X project using Qt Creator. It is a QML project with a C++ plugin that I created. So, I believe that you can use Qt Creator to create a pure C++ project for OS X. But give Qt Creator a shot and see if that is true.
Now, for iOS, I think you'll have to create a QML project. You can always use C++ to add functionality. However, I am having trouble getting a C++ plugin to compile in an iOS project. But, I think that it is just a matter of finding the solution.
The workflow for OSX/iOS app development is quite simple. You develop your application as usual in Qt Creator. Each time qmake is called on your code, it created an Xcode project xxx.xcodeproj where xxx is the application name specified in your .pro file.
Hence, when you have completed the development process, you can open such a project and finalize the app packaging/submission via xcode. The created project includes all the necessary framework dependencies and is ready to be archived, i.e. packaged for AppStore submission. The submission is a tedious task, see here for example.
You can absolutely submit the app to the AppStore, even with the community license. Mind that you are subject to LGPL. This aspect is treated in full detail in this recent blog post.
If you're developing for iOS and OS X only - use native tools, i. e. Xcode. Qt library and Qt Creator IDE are best used for cross-platform development, but not for native OS X development.
I am new (relatively) to C++ and to SO.
Having stretched the creativity of console applications to the limit, my very rabid mind wants to know how to code GUIs now. I did some research, decided to use GTK rather than Qt because of having freedom of choice, there being no strings attached and something about slow internet and having to download some 0.6GB were I to go with Qt.
It has been a brutal 48 hours trying to build 'Hello World' on Gtk. This is me throwing a tantrum. I'm using Visual Studio 2010. Perhaps this is the source of all my woes. It seems Gtk is meant for C and not C++. After solving issues with header files includes and a certain notorious glibconfig.h missing (which I downloaded from the internet only to find, to my horror,that it is supposed to be a generated file), the compiler threw syntax errors,especially in one gatomic.h.
I suspect 10 errors will come up for every one I manage to solve. This is where you come in. Do you use Gtk to develop c++? If not, why so? What would you recommend instead? Do you use Gtk on windows? How is that possible? Please give details.
Is it possible to make cross-platform apps that use C++ code and a Python/VB GUI?
Your answer will be sincerely appreciated.
First off, a general note: Gtk being mainly developed as a toolkit for Gnome, I think it is fair to say that the main focus is high quality on Linux while other platforms are somewhat second-class citizens. This is probably most visible by looking at the integration with the native look and feel of Windows and MacOS. If you are looking for a toolkit which behaves equally well on all major platforms, I'd recommend you reconsidered Qt.
As far as your more specific questions are concerned:
C/C++
Gtk is written in C, and consequently has a C API. If you are looking for a C++ API, look at the Gtkmm bindings. Note that you can also use the C API in a C++ application.
glibconfig.h
I don't know whether you tried compiling Gtk yourself, but the easiest way to get Gtk3 for windows is by downloading the precompiled all-in-one bundle from http://www.gtk.org/download/win32.php (which includes the glibconfig.h you are missing).
When and how to use Gtk and with what language
As pointed out above, the primary users oft Gtk are people who develop applications for the Gnome desktop environment. Most cross-platform applications nowadays however use Qt since the quality on Windows and MacOS is higher compared to Gtk on those platforms.
Concerning what langauge to use, a strength of Gtk is that there exists bindings for many languages (including C++ and Python), so you are certainly not confined to C.
When developing with C++, something that I personally like about Gtkmm is that it uses the standard library, as opposed to Qt which has it's own implementations for data structures etc (the reason being that Qt predates the times when the STL was generally available and usable on all main platforms).
How to use Gtk: contrary to Qt which has the excellent Qt Creator, Gtk is somewhat lacking a specifically designed IDE for easy development. The closes you'll get is using Glade for interface design and a text editor or IDE of your choice for the coding, but that choice will differ depending on the platform you are on. Clearly, as you probably noticed, integrating Gtk into the environment of choice usually requires some work (and also some more technical knowledge). So again, if you are looking for an easy to set-up and use environment for developing GUI applications, I'd just go with Qt and Qt Creator.
Cross-Platform apps
First off, Visual Basic is not cross-platform. But generally speaking, there are plenty of possibilities for doing cross-application development, using various languages.
I've had to get a gtk3 project working on windows a few months ago, when gtk3 just came out for windows. I've had problems compiling it under Visual Studio as well, and posted a question here, specifically this one.
Here's how I got it working on windows:
Download the all-in-one bundle for Windows from gtk.org
Install, etc, set up include/link dirs within the project. (personally, I dumped gtk's folders in the project folder, pointed at "include" as an include dir and "lib" as a link dir, then proceeded to move any files/folders the compiler cannot find around to the root of "include" )
If not set up automatically, add include and link dirs as necessary until the compiler finds all the files.
If using MinGW to compile, it will succeed at that point.
If using Visual Studio, you have to modify gtk headers as described in the gtk mailing list:
In gutils.h lines 82 and 122, and in gstring.h line 129, change
"static inline" to "static __inline".
Blockquote
Note that the modification does not impact MinGW's ability to compile.
I have successfully compiled my gtk3 project on both windows (with either Visual Studio or Code::Blocks) and linux without writing platform-specific code that way. Just don't forget to include the required runtime dlls with the program when you ship it.
I am new to codeblocks and Qt. I would like to create some nice interfaces with buttons, lists, combo box and so on using Qt. Can someone help me, give me some links from where I can start my journey? I didn't find anywhere how to include qt designer in codeblocks in order to work with it.
Any help is appreciated.
P.S I am working in Ubuntu. I did install code::blocks 10.05 . I also have QT Designer, Creator, LInguist and Assistent.
When you have Qt Creator, you don't need anything else unless you have any specific preference for Code::Blocks or any other IDEs.
Qt Creator has an integrated debugging interface too (somewhat similar to Visual Studio).
Here is the Qt Creator manual and here you can find details on How to manage projects using Qt Creator.
If you already have all the Qt tools (Creator, Designer, etc.) then why not just use Qt Creator?
It is a wonderful little IDE and is perfect for Qt developing. I actually prefer using it on Ubuntu (on Windows I use the VS Add-In for VS 2010).
The only thing that takes getting used to is adding dependencies which you must directly edit the .pro file for. See http://doc.qt.io/qt-5/qmake-project-files.html