{"id":13484107,"url":"https://github.com/ryanmelt/qtbindings","last_synced_at":"2025-05-16T08:02:53.954Z","repository":{"id":51287665,"uuid":"808295","full_name":"ryanmelt/qtbindings","owner":"ryanmelt","description":"An easy to install gem version of the Ruby bindings to Qt","archived":false,"fork":false,"pushed_at":"2021-02-15T05:22:55.000Z","size":3463,"stargazers_count":339,"open_issues_count":11,"forks_count":63,"subscribers_count":41,"default_branch":"master","last_synced_at":"2025-05-12T21:08:38.830Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://github.com/ryanmelt/qtbindings","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanmelt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":null,"license":"COPYING.LIB.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-07-30T20:49:49.000Z","updated_at":"2025-05-09T09:27:03.000Z","dependencies_parsed_at":"2022-09-13T18:22:03.383Z","dependency_job_id":null,"html_url":"https://github.com/ryanmelt/qtbindings","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmelt%2Fqtbindings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmelt%2Fqtbindings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmelt%2Fqtbindings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanmelt%2Fqtbindings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanmelt","download_url":"https://codeload.github.com/ryanmelt/qtbindings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493382,"owners_count":22080126,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T17:01:19.505Z","updated_at":"2025-05-16T08:02:53.843Z","avatar_url":"https://github.com/ryanmelt.png","language":"C++","funding_links":[],"categories":["GUI","👓 Alternatives to the [Electron.js](https://electronjs.org) ⚛"],"sub_categories":["Ruby"],"readme":"# qtbindings - Ruby bindings to QT\n\n[![qtbindings Version](https://badge.fury.io/rb/qtbindings.svg)](https://badge.fury.io/rb/qtbindings)\n[![qtbindings-qt Version](https://badge.fury.io/rb/qtbindings-qt.svg)](https://badge.fury.io/rb/qtbindings-qt)\n![Ruby](https://github.com/ryanmelt/qtbindings/workflows/Ruby/badge.svg)\n\nWarning: This project is no longer maintained. It only supports Qt4 which the latest linux distributions no longer include in their package repos. No future releases or changes are planned. If you would like to take over, please fork, and make the changes to support Qt5/Qt6. This will be really difficult as the Smoke libraries used in this project do not work well with C++11+. Its been a fun 10 years maintaining this for the Ruby community, but at this point I would recommend using Python if you want to create a modern desktop application using Qt. I'm personally switching to developing web apps using Vue.\n\nNote: The current windows gem (since 4.8.6.4) only works with Ruby 2.4 and Ruby 2.5.  To use Ruby 2.0 to Ruby 2.3 please install version 4.8.6.3\n\nThis project provides bindings that allow the QT Gui toolkit to be used from the\nRuby Programming language. Overall it is a repackaging of a subset of the KDE\nbindings ruby and smoke systems into a format that lends itself well to\npackaging into a Ruby gem.\n\nGoals\n-----\n1.  To make it easy to install a Qt binding for Ruby on all platforms using RubyGems\n2.  To maintain an up-to-date binary gem for Windows that is bundled with the latest version of Qt 4\n3.  To reduce the scope and maintenance of the bindings to only bind to the libraries provided by the Qt SDK.\n4.  To increase compatibility with non-linux platforms\n\nNote: Qt 4.8.7 and 5.X is currently NOT supported.  \nFor Ruby 1.9.3 you should use version 4.8.5.2.  \nFor Ruby 1.8.x you can try installing version 4.8.3.0, however upgrading Ruby is highly recommended.  \n\nUsage Notes\n------------\nRuby threading is now fully supported out of the box. All GUI access however must be done\ninside the main thread. To support updating the GUI using other threads, use the following function\nprovided in Qt4.rb:\n\n```ruby\nQt.execute_in_main_thread do # block the main thread\n  # GUI code which executes and then allows the main thread to execute\nend\n\nQt.execute_in_main_thread(false) do # don't block the main thread\n  # GUI code which executes in parallel with the main thread\nend\n```\n\nTo use Qt plugins (Reading jpgs, etc) on Windows, you should add this line after creating your Qt::Application.\n\n```ruby\nQt::Application.instance.addLibraryPath(Qt::PLUGIN_PATH)\n```\n\nTested Environments\n--------------------\nMac OSX 10.13.6 (High Sierra)  \nXCode 5 (clang)  \nBrew - QT 4.8.6  \nCMake 3.10.2\nRuby 2.6.5 - Must be compiled with clang (rvm install \u003cversion\u003e --with-gcc=clang)\n\nWindows 7 SP1  \nQT SDK 4.8.6-1  \nCMake 3.6.3  \nRuby 2.5.7 installed from rubyinstaller.org  \n\nUbuntu Linux 16.04\nQT SDK 4.8.6\nCmake 2.8.5  \n\nCompiling\n---------\nCompiling qtbindings requires the following prerequisites:\n\n1.  Ruby (Ruby must be compiled with --enable-shared on all platforms and with --with-gcc=clang on OSX)  \n    On Windows use the latest from [RubyInstaller](http://rubyinstaller.org/downloads/)  \n    You'll need both the 32bit and 64bit installers to make the fat binary gem \n2.  [CMake 3.6.x](https://cmake.org/download)\n3.  On Windows get [OpenSSL 1.0.2 x64](http://slproweb.com/products/Win32OpenSSL.html) (not Light)  \n    Install with all defaults to C:\\OpenSSL-Win64  \n4.  [QT 4.8.6](https://download.qt.io/official_releases/qt/4.8/4.8.6/) (mingw version for Windows)  \n    On Windows install to C:\\Qt\\4.8.6-Ruby24 (when installing specify the mingw inside the 32bit DevKit)  \n    On Windows install a second copy to C:\\Qt\\4.8.6-64-Ruby24 (when installing specify the mingw inside the 64bit DevKit)  \n    Install [Jom](https://wiki.qt.io/Jom) to C:\\Qt\\4.8.6-64-Ruby24 (or anywhere in your path)  \n5.  gcc 4.x, 5.x, or 6.x (or clang for OSX 10.9)  \n    On Windows gcc 4.x is included in the DevKit  \n\nNote for OSX 10.9.  The default compiler has changed from gcc to clang.   All libraries need to be compiled with clang or you will get segfaults.  This includes ruby, qt, and qtbindings.  *** rvm does not compile with clang by default.  You must add --with-gcc=clang when installing a version of ruby ***\n\nAdditionally: all of the operating system prequisites for compiling, window system development, opengl, etc must be installed.\n\nRakefile\n--------\nPerform the following steps to build the gem on Unix or Mac:\n\n1. `rake VERSION=4.8.x.y gem`  \n    Where the x is the subversion of QT and y is the patch level of qtbindings\n\nPerform the following steps to build the gem on Windows:\n\n1. cd vendor\n2. Edit BuildWindowsGems.bat to ensure all paths are correct\n3. Run: BuildWindowsGems.bat\n\nNote: The gem is built two times to create two FAT binaries which will work on Ruby 2.4 and higher (x64/x86).\n\nAfter building the gem, verify the examples work by running:\n\n1. `rake examples`\n\nOperating Systems Notes:\n\nDebian Linux\n------------\n\n1. The following should get you the packages you need:\n\n```\nsudo aptitude install build-essential bison openssl libreadline5 \\\n  libreadline-dev curl git-core zlib1g zlib1g-dev libssl-dev vim \\\n  libsqlite3-0 libsqlite3-dev sqlite3 \\\n  libxml2-dev git-core subversion autoconf xorg-dev libgl1-mesa-dev \\\n  libglu1-mesa-dev ruby-dev libqt4-dev\n```\n\nFedora Linux\n------------\n\nYou will also need these packages:\n```\nsudo yum install qtwebkit-devel qtwebkit\n```\n\nMac OSX Snow Leopard\n-----------------------\n\n1. XCode\n2. Brew (http://mxcl.github.com/homebrew/)  \n   Install qt with `brew install qt`\n\nWindows - Note: Only necessary for debugging (binary gem available)\n--------\nQt should be rebuilt using Devkit before building.\n\n1. Run vendor\\PatchQt4.8.6Ruby24.bat\n2. Copy vendor\\BuildQt4Win32Ruby24.bat to C:\\Qt\\4.8.6-Ruby24 and run it\n3. Copy vendor\\BuildQt4Win64Ruby24.bat to C:\\Qt\\4.8.6-64-Ruby24 and run it\n\nInstall\n------\nOn linux/MacOSX you must make sure you have all the necessary prerequisites\ninstalled or the compile will fail.\n\n    gem install qtbindings\n\nThis should always work flawlessly on Windows because everything is nicely packaged into a binary gem. However, the gem is very large ~90MB, so please be patient while gem downloads the file.\n\nTo get help:\nYou can file tickets here at github for issues specific to the qtbindings gem.\n\nLicense:\nThis library is released under the LGPL Version 2.1.\nSee COPYING.LIB.txt\n\nContributing:\nFork the project and submit pull requests.\n\nDisclaimer:\nAlmost all of this code was written by the guys who worked on the KDE bindings project, particurly Arno Rehn and Richard Dale. This project aims to increase the adoption and use of the code that they have written.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanmelt%2Fqtbindings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanmelt%2Fqtbindings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanmelt%2Fqtbindings/lists"}