Capture Windows messages in QT

Source: Internet
Author: User

I personally like the message mechanism of QT, and I am afraid of MFC. I do not recognize the code I have written... The most terrible thing is that I want to write my own UI to run in Linux.

At first, we planned to develop wxWidgets, which is also cross-platform, with a high speed. I have been biased against qt's license before, and I feel that Linux is not enough and I have never been jealous of it.

So the probability of KDE appearing on my desktop is much lower than that of gnome...

Later, considering multiple factors such as cross-platform, IDE, and interface design tools, I chose QT which I ignored for N years.

(The ui I first came into contact with is GTK, not Win32 or MFC ). After using QT, the coding experience is amazing.

Whether it is a simple interface design, a clear messaging mechanism, multi-language support, cross-platform, a wide range of auxiliary libraries, lgpl license, and so on...

Qt has undoubtedly become my favorite UI library...

 

Since windows is still being developed, you cannot forget Win32. Let's just say a function.

You can filter messages by yourself before using QT To Capture messages in windows ..

Bool qwidget: winevent (MSG * message, long * result) [Virtual protected]

Perfect. In fact, many things in windows can be obtained in QT. For example, the window handle can be obtained through the winid () of qwidget.

However, if you write this code, it is obvious that the cross-platform nature is broken. However, sometimes global cross-platform performance is achieved through local platform dependencies. This is called "divide and conquer "..

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.