Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Case Analysis of Development skills of Qt

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the relevant knowledge of "case Analysis of Qt Development skills". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

The code determines the MSVC compiler version.

If (_ MSC_VER = = 1800) MSVC++ 14.0 _ MSC_VER = = 1900 (Visual Studio 2015) MSVC++ 12.0 _ MSC_VER = = 1800 (Visual Studio 2013) MSVC++ 11.0 _ MSC_VER = = 1700 (Visual Studio 2012) MSVC++ 10.0 _ MSC_VER = = 1600 (Visual Studio 2010) MSVC++ 9.0 _ MSC_VER = = 1500 (Visual Studio 2010) MSVC++ 8.0 _ MSC_VER = = 1400 (Visual Studio 2005) MSVC++ 7.1 _ MSC_VER = = 1 310 (Visual Studio 2012) MSVC++ 7. 0 _ MSC_VER = = 1300 MSVCs + 6.0 _ MSC_VER = = 1200MSVCMs + 5.0 _ MSC_VER = = 1100

Judge different platforms in pro: message ($QT_ARCH) contains (QT_ARCH,arm).

Restore interface after Qt minimization, fake freeze, plus code

Void showEvent (QShowEvent * e) {setAttribute (Qt::WA_Mapped); QWidget::showEvent (e);}

Get the height of the title bar: style ()-> pixelMetric (QStyle::PM_TitleBarHeight); click PM_TitleBarHeight and you will find a new continent.

Set the high split screen attribute to support high resolution such as 2K4K, especially the mobile phone app. Must be written before the QApplication a (argc, argv); of the main function.

# if (QT_VERSION > QT_VERSION_CHECK (5mem6)) QGuiApplication::setAttribute (Qt::AA_EnableHighDpiScaling); # endif

If the running program appears Fault tolerant heap shim applied to current process. This is usually due to previous crashes. Mistake. How to do this: open the registry, find HKEY_LOCAL_MACHINE\ Software\ Microsoft\ Windows NT\ CurrentVersion\ AppCompatFlags\ Layers\, select the Layers key, and delete your program path from the list on the right.

Qt has a built-in form interface for QFormLayout form layout to automatically generate a combination of tags and input boxes.

Sudo apt-get install libpulse-dev is required for qml to play videos in linux.

You can directly inherit QSqlQueryModel to implement custom QueryModel, such as a column of font colors, placeholders, other styles, etc., and rewrite QVariant CustomSqlModel::data (const QModelIndex & index, int role) const.

Qt5 later provides the class QScroller to scroll the control directly.

Ui- > listWidget- > setHorizontalScrollMode (QListWidget::ScrollPerPixel); QScroller::grabGesture (ui- > listWidget,QScroller::LeftMouseButtonGesture); "case study of Qt Development skills" ends here. Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report