Windows下载编译Qt5 Gui

 

CMakeLists.txt 源码

cmake_minimum_required(VERSION 2.8.11)
project(HelloQt5)
# Find the QtWidgets library
find_package(Qt5Widgets)
# Tell CMake to create the HelloQt5 executable
add_executable(HelloQt5 WIN32 main.cpp)
# Use the Widgets module from Qt 5.
target_link_libraries(HelloQt5 Qt5::Widgets)

 

main.cpp 源码

#include <QApplication>
#include <QLabel>

int main(int argc, char* argv[])
{
	QApplication app(argc, argv);
	QLabel *label = new QLabel("Hello Qt5!");
	label->show();
	return app.exec();
}

 

相关文章:

  • 2021-11-04
  • 2021-05-27
  • 2021-05-06
  • 2022-12-23
  • 2022-12-23
  • 2021-06-29
  • 2022-02-04
  • 2021-07-17
猜你喜欢
  • 2022-12-23
  • 2022-01-28
  • 2021-11-17
  • 2022-12-23
  • 2021-11-23
  • 2021-12-20
相关资源
相似解决方案