Unsolved What is Qt in few sentences?
-
I am in need of having to work with a program build in Qt and we are having a challenging time as new comers to Qt getting a handle on it (counter to all the vigorously advertised strength of Qt), having trouble, after a few hours of looking around, figuring out what QT IS still:
Here is what the Qt website says:
"What is Qt
Qt is much more than just a cross-platform SDK - it's a technology strategy that lets you quickly and cost-effectively design, develop, deploy, and maintain software while delivering a seamless user experience across all devices. "So, trying guess here:
- its an SDK (for what?)
- Technology strategy? To program quickly? (What is that? Highly non-informative as described)
- Maintain software? (Some kind of IDE, that helps organizing code components?)
Is there something more for all the over-bloated level of complexity of Qt? I feel like we are missing something here and they are not explaining it, at least on the forefront stage, which is probably the most important stage for creating somewhat of a sound perception of the tools and capturing a potential user's interest.
We would be very grateful if someone could shed light to a new-comer on what Qt is, specific technical components instead of non-informative business jargon presently on the website.
With much thanks...
-
@Devorlab What it basically boils down to is, Qt is a cross platform toolkit for building applications. The core of this has always been GUI components that look and act native on all platforms.
Over the years (and it has been many, 20+) Qt has added functionality for hardware, 3D graphics, and tons of other stuff. This is the "bloat" you are talking about. Us Qt users call them features. ;) Qt has become a toolkit that is able to completely shelter you from writing native code on each OS. It is very rare these days that I have to write something native, i.e. objective c on osx, or win32 api on windows, etc.
It will take some learning to understand Qt. Not too much as long as you have strong C++ skills. If you are new to C++ and trying to learn Qt on top of that it can be frustrating to say the least. Expect to spend a week or 2 actually using it to understand things though. Signal/slots are probably where you are getting confused. They are basically just events from other systems.
Like any project, things can be written poorly with Qt. A well written Qt app is very clear (at least imo) and fairly easy to follow/understand. That being said I inherited a 400k lines of code Qt project that was an absolute nightmare to support. And I have 16 years of Qt experience. I almost gave up it was so convoluted. I used sourcetrail to help me dig into the code. It helped a bit but at the time (beta way back) it didn't handle all the Qt stuff. It did help navigate and understand the code though.
I'm not sure a definition of what Qt is will help you though. If you could post some technical questions we could definitely help you learn Qt or understand your new project.
-
Thanks. So sounds like Qt intends to be Java with a difference of attempting to compile naively instead of for a virtual machine (besides the difference in coding language) ?
-
Hi,
Not at all, Qt is even older than Java (well 3 days older). You could even use Qt with Java through the Qt Jambi bindings.
Qt doesn't "attempt" to compile natively, it's C++ with some Objective-C/C++ for the Apple platform so it is compiled natively on all platform it runs on.
-
I am a newcomer to Qt, and I have started a project to convert 500K+ lines of C++/Win32 to Qt. My objective is to have one source code that compiles and runs both under Windows and macOS. If your background is Windows, here's what I'm seeing so far:
- No "WinMain" and arcane message loop, just "main"
- RC resource files are replaced with .UI files (XML-based), or you can build them dynamically with simple, elegant and intuitive API calls. With Qt you nest your dialog components, which leads to powerful but simple constructs.
- GDI is replaced with QPainter
- Most system-specific stuff (date/time, file dialog, color dialog, file open/read/write, strings) has a Qt equivalent, which preserves platform independence.
- slots/connections instead of callback functions.
- You keep all your platform-independent code, and call Qt APIs to display dialogs, graphics, lists, etc.
- You can stay with Visual Studio for compiling
Qt Designer (for creating dialog boxes) makes the Visual Studio Resource Workshop look medieval. Qt is a pleasure to use. It includes sophisticated graphical tools to assemble dialogs. Qt uses layouts that allow the dialog, and all its components, to grow dynamically when the user grabs and extends the dialog. This is barely doable in MFC, and absolute torture in Win32. Qt Designer is what Microsoft should have done with VS ten years ago. I suppose WPF and Silverlight were attempts to simplify GUI design. I don't know, I never used them.
I am faced with the necessity of upgrading my code. I never went .NET. In its infancy, I heard horror stories of machines not booting after a .NET install. My customer base could not deal with that.
Today, Microsoft wants me to convert to WinRT and Universal Windows Platform (UWP). Are you kidding me? It's the OS/2 of the XXIst century. No way Jose.
One of my colleagues converted an MFC app to Qt and loved it. The kicker is that there are some companies that develop for Windows only, and still use Qt because it makes their programmers so much more productive.
I recommend spending a couple of days (or having an employee do it) evaluating Qt by building a simple app. The documentation is outstanding and well-organized, the examples are plentiful and built right into the Qt Creator IDE.
Beyond that, if you're developing for mobile, there's Qt Quick.
The difference is that Java is interpreted (JVM), whereas Qt generates native code. The macOS dialogs look just like native apps.
Bottom line, Windows is no longer the dominant player. If you want your app to survive, you need to break away. HTML-based solutions (Electron) create one more dependency: the browser. Now you have two problems: making your app work, then compensating for the deficiencies of all the browsers (Edge is a piece of crap).
Just my 2¢.
-
@Devorlab said in What is Qt in few sentences?:
Thanks. So sounds like Qt intends to be Java with a difference of attempting to compile naively instead of for a virtual machine (besides the difference in coding language) ?
If you are familiar with Java, then I think this analogy works.
Qt started off as a C++ library for writing GUIs. Over the years, it grew into a multi-purpose library also invented the QML language. Here's a more concrete overview of what Qt contains: http://doc.qt.io/qt-5/qtmodules.html
-
My attempts at Qt in a few sentences.
Qt is a collection of related libraries and tools that started as a C++ GUI application framework, and grew to cover a wide range of functionality. Today Qt includes C++ libraries for things like GUI, networking, 3D graphics, audio, and database access with bindings Python and third party bindings for other languages, and a domain specific language called QML for UI development. Qt also includes an IDE and tools for build and deployment.
-
Thank you wrosecrans, that's most helpful/concrete description I was looking
This is what I am getting so far, correct me if I am wrong:
-
A C++ based GUI development tools/SDK that "claims" to be platform independent
-
Collection of compilers for different platforms (to support the above)
-
IDE (to manage your code/files)
-
- some other stuff ( gas station + convenient store model)
-
-
@Devorlab
Qt is certainly platform-independent across Windows, MacOS & Linux, which is what it claims. It also does stuff for mobile OSes.•Collection of compilers for different platforms (to support the above)
That needs to be libraries, not compilers.
-
Small correction: Qt Creator is not part of the Qt Framework. It's an independent (and younger) project although it comes from the the same company.
-
@Devorlab said in What is Qt in few sentences?:
A C++ based GUI development tools/SDK that "claims" to be platform independent
It's not quite platform independent, and it doesn't really claim to be. But it is extremely portable, and works great on most common platforms. It's also a bit narrow to say it's just for GUI development. That was certainly the original focus of the project, but lots of people write things like network server daemons using Qt, since the libraries cover a wide range of problem domains after 20+ years of development.
Collection of compilers for different platforms (to support the above)
No compilers, but it works great with all the most common compilers that developers are likely to use like gcc, clang, and msvc.
IDE (to manage your code/files)
some other stuff ( gas station + convenient store model)