在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):lqt5/lqt开源软件地址(OpenSource Url):https://github.com/lqt5/lqt开源编程语言(OpenSource Language):C++ 70.4%开源软件介绍(OpenSource Introduction):Overviewlqt is a Lua/luajit binding to the Qt5 framework. It is an automated binding generated from the modified version of Qt headers, and covers almost all classes and methods from supported Qt modules. For more info, check the documentation, mailing list or contact the authors:
Features
Historylqt 0.9
Building lqtTo compile lqt, you need:
You can get the latest source of lqt from https://github.com/lqt5/lqt . When you have the sources. On Windows platformCheckout sub module repos: git submodule update --init --recursive --remote Compile cd modules\src\LuaJIT\src
call msvcbuild.bat Edit CMakeList.txt, change this line to your Qt install folder: set(CMAKE_PREFIX_PATH D:/Qt/Qt5.13.0/5.13.0/msvc2017_64/lib/cmake) Create an out-of-source build directory
(where the binaries will be built, I often use md build Then, use CMake to generate the msvc solution and run cmake -G "Visual Studio 15 2017 Win64" -H. -Bbuild
cmake --build build --target ALL_BUILD --config RelWithDebinfo -j4 On MacOS platformCheckout sub module repos: git submodule update --init --recursive --remote Compile cd modules/src/LuaJIT
make -j8 Edit CMakeList.txt, change this line to your Qt install folder: set(CMAKE_PREFIX_PATH ~/Qt/5.13.0/clang_64/lib/cmake/) Then, use CMake to generate the Makefile and run mkdir build; cd build
cmake ..
make -j4 # use parallel build with your number of cores/processors FinishThe generated Lua binding libraries are created in the UsageA quick example of "Hello World!" button with signal/slot handling: local QtCore = require 'qtcore'
local QtGui = require 'qtgui'
local QtWidgets = require 'qtwidgets'
local app = QtWidgets.QApplication.new(select('#',...) + 1, {'lua', ...})
local btn = QtWidgets.QPushButton.new("Hello World!")
btn:connect('2pressed()', function(self)
print("I'm about to close...")
self:close()
end)
btn:setWindowTitle("A great example!")
btn:resize(300,50)
btn:show()
app.exec() For more examples, check out the License
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论