What rendering API does Qt use on Windows? - windows

What underlying rendering system does the Qt GUI toolkit use on Windows? (I'm assuming it is GDI)

QT is a c++ library, and preduce native application. so the only option is:
gdi/gdi+

Related

Mono - Native UI on each platform?

Is it possible to have one core dll written in mono and 3 separated native UIs on Linux, Mac and Windows? If yes, what are the options I have?
Let's assume I have written a GUI with WPF (Windows) and now I want to connect the mono dll to the WPF Form so I can use it's exported functions and classes. Same on Mac OS X: GUI written in Cocoa and connected to a mono core dll?
Do you guys know any example projects, which uses that approach?
Well, you can use a PCL library that contains your logic, combined with the Xamarin.Mac framework on OSX, GtkSharp on Linux, and WPF on Windows. As for using raw Cocoa, that'd be tougher; you'd have to host the Mono runtime (which is not impossible but also not easy).
Edit: I should add that you could also try for a "write once" UI and use GtkSharp for all three.
I found a possible solution: https://github.com/picoe/Eto
It does exactly what I was looking for!

How do you write a cross platform GUI toolkit?

Like with toolkits such as qT, wxwidgets and such, how does an API designer provide and api that is the same, even though it calls totally different system calls to do so? For example, in Windows OS you have to mess around with a whole lot of functions in the GDI. On Linux you have to mess around with a whole lot of functions in XLib and whatever other layers the distribution has on top of in. So how how can you design an widgit kit that can unify all that functionality? so that say CreateWindow() will create a windon on any platform? I don't comprehend how this can be done.
Instead of using Xlib or GDI, you could use something that is more universal. For example, you could use OpenGL, which is supported everywhere. I think that is what Blender's UI does.
Some toolkits can be modified to use some kind of backend for each platform they support. This is basically what Qt does. On Mac OS X, Qt apps use Cocoa as a backend. Qt for OS X was made specifically for that OS. However, there are other Qt implementations on other platforms, so that's what makes Qt work on more than one platform. SWT for Java works the same way (using the OS's native toolkit as a backend).
Other toolkits can use some kind of high-level layer to render. For example, Swing for Java is rendered purely using Java APIs, and is not tied to any platform at all.

OpenCV and the User Interface

I need to do a project on image processing using OpenCV and I am just starting to learn the basics, however I need to know one thing about the User Interface, can I design the UI using the libraries provided by OpenCV ? This includes forms, buttons and event handling or do I need to use some other language for the UI ?
OpenCV provides a highgui library which contains minimum UI functionalities like ShowWindow, Trackbar,Mouse events etc. It is not useful for advanced GUI development.
Check out OpenCV documentation: Link 1, Link 2
And it is expanded by few more functions from qt for support like button etc. Link 3
But for advanced GUI development, OpenCV is integrated with Qt. Qt is very advanced, highly stable framework and it is free and opensource. It is implemented in C++, so easy to use with OpenCV. More interesting thing is that, if you use Python for OpenCV, then Qt also has got python wrapper called PyQt which covers almost all functions of Qt.
You can download Qt from here. Checkout its documentation and wide variety of tutorials. Tutorials are very extensive for Qt. So it is not a difficult thing to learn.
Installation guide for OpenCV and Qt are found here: Link
You can use MFC using Microsoft Visual Studio for opencv ui
Click here! to Know more about MFC.
OpenCVSharp is a great C# wrapper for OpenCV project. Its latest version 2.4.5 uses OpenCV 2.4.0 dlls. Check it out, too.

Qt and SDL together under Windows

I read this advice:
How do I use Qt and SDL together?
and now I have question connected to it. This example was created for Linux, but how use it under Windows? winId() under Windows return WinAPI Handler for widgets, other then Linux. Is there any possibility to use SDL under Windows with Qt?
Yes.
Both of them are portable frameworks and tools. I think there is no huge problem but maybe there is some easy compilation issues.
Note: winId() returns OS-specific value such as HWND for Windows, HIView for Mac and Window for X.
Returns the window system identifier of the widget.
Portable in principle, but if you use it you are probably about to do
something non-portable. Be careful.
If a widget is non-native (alien) and winId() is invoked on it, that
widget will be provided a native handle.
On Mac OS X, the type returned depends on which framework Qt was
linked against. If Qt is using Carbon, the {WId} is actually an
HIViewRef. If Qt is using Cocoa, {WId} is a pointer to an NSView.

Mac/Windows MIDI application programming language

What is the best programming language for writing MIDI-interactive musical application that would be run on MAC and on Windows?
I've written cross platform (Mac OS X and Windows) MIDI applications using C++. I used the RtMidi for MIDI I/O which was incredibly easy to get going (on every platform just it just worked out of the box). The advantage of C++ is that you can use native GUIs on each platform, but if you're not already into C++ I'd say a cross platform project is a pretty ambitious first project.
One possibility is .NET (C# or VB.Net), which runs on Windows (of course) and Mac (thanks to Mono). The downside is that .NET does not have any native support for MIDI, so you'd have to tap into two different native APIs for MIDI.
Java is another possibility, since it has a number of MIDI-supporting libraries available. Your UI is bound to look pretty terrible, though.
Python has substantial support for MIDI and runs on Mac and Win.
pygame.midi
PyPortMidi
PythonMIDI
pyrtmidi
For both mac and windows I would suggest Java. Midi is just a protocol so any language can do it. A good framework will speed things up a lot. Java has frameworks to work with Midi and other multimedia sources.
PortMidi is another popular cross-platform MIDI library. Qt is a nice cross-platform Framework, GUI and utility library.
It's an old thread, but nowdays you can use .NET. I mean official cross-platform .NET from Microsoft, not Mono. In this case I can recommend my library – DryWetMIDI. Its core part (working with MIDI files, processing MIDI data and so on) is cross-platform for any OS supported by .NET.
As for working with MIDI devices, this API supports Windows and macOS (that's what you need). Full documentation of the library availabale here: https://melanchall.github.io/drywetmidi. There you can find full API reference and help articles. For example, overview article on working with MIDI devices.
The library is distributed via NuGet package and can be installed via NuGet on both Windows and macOS.

Resources