QtRuby is a cross-platform application framework Qt binding for Ruby.
Questions tagged [qtruby]
58 questions
2
votes
1 answer
RubyQt Crashing on QTableWidget
I'm getting some weirdness with QtRuby when using a TableWidget. The table widget loads, but when you click on the elements in the row, the app segfaults and crashes.
require 'Qt4'
class SimpleModel < Qt::AbstractTableModel
def…

gja
- 23
- 2
2
votes
1 answer
QtRuby GridLayout- undefined method 'addWidget'
I'm working on a GUI project using QtRuby. However, as soon as I added code to use a GridLayout in my MainWindow object, I started receiving this error:
mainwindow.rb:37:in `method_missing': undefined method `addWidget' for…

Alex
- 699
- 1
- 10
- 20
2
votes
1 answer
Ruby + mysql2 querying fails with variables
Working with Ruby 2.0, Qt4 gem and Mysql2 gem. I need to compare the text of two lineedit and make a query with them, which is a failure so far.
client = Mysql2::Client.new(:host => "localhost", :username => "root", :password => "123456", :database…

Juank
- 155
- 3
- 13
2
votes
1 answer
Acquiring a reference to the emitting widget with QtRuby
I'm currently connecting the signal to a function like this:
dashboard.ui.start_button_r1.connect(:clicked, dashboard.ui.start_button_r1, :handler)
where start_button_r1 is a QPushButton
Now what I want is a reference to the sending widget within…

Juan Pablo Santos
- 1,200
- 2
- 10
- 25
2
votes
4 answers
is it good programming practice to put code statements in braces?
I have never seen this being done anywhere in all the source code i've read in my life. If it is considered bad programming practice, there has to be a reason for it which i fail to understand. Also, I think it sometimes improves readability rather…

potlee
- 405
- 1
- 5
- 13
2
votes
1 answer
Qtdesinger, ruby and some action for buttons/widgets in generated code
I am developing an application using ruby and qt as front end. I used qtdesigner to draw gui and converted the code using rbuic4. But i am unable get any action for buttons placed on main programm. I created main.rb and called generated code using…

sundar_ima
- 3,604
- 8
- 33
- 52
2
votes
0 answers
Can QtRuby applications be deployed on Apple's App Store?
I'm debating whether I should go with MacRuby or QtRuby. I definitely want to deploy my app on the App Store, however. If QtRuby cannot be deployed on the App Store, I will have to use MacRuby.

sivabudh
- 31,807
- 63
- 162
- 228
2
votes
1 answer
Qt Model/View programming examples and tutorials in Ruby
I'm learning about Qt Model/View with Ruby and I'm trying run the following code
require 'Qt4'
class MyModel < Qt::AbstractListModel
def initialize(data = [])
super()
@data = data
end
def rowCount idx
…

Cristhian Boujon
- 4,060
- 13
- 51
- 90
1
vote
1 answer
Can't display more than one table model inheriting from the same class on different tables in QtRuby
I've been following this article to display ActiveRecord data in QtRuby. I've copied the BoatTableModel class from there(used my own code for the rest). In the article, BoatTableModel is defined to only support the Boat model, but except for the…

Idan Arye
- 12,402
- 5
- 49
- 68
1
vote
2 answers
Qt4 QtRuby installer
I'm following this tutorial for QtRuby
--@ http://tom.paschenda.org/blog/?p=38
At one point I have to go on this site :
--@ vision.eng.shu.ac.uk/mmvlwiki/index.php/Qt4-QtRuby_installer_for_Microsoft_Windows
but it seems down...So is there any…

Ko Ichi
- 167
- 1
- 7
1
vote
3 answers
QTextEditor returns quotes as question marks in QT Ruby
When I copy and paste from a Word document into a QT TextEditor, It seems to look fine. But when I try to access the text using toPlainText or toHTML, it returns the text with all of the quotes (double and single) as question marks. Is there a way…

GitNick
- 311
- 2
- 14
1
vote
1 answer
Problem when requiring 'Qt4' in Ruby 1.8.7
I have successfully installed:
Ruby 1.8.7-p334
Rubygems 1.7.2
rake 0.9.0
qtruby4 2.1.0 mswin32
Now the following block of code
require 'rubygems'
require 'Qt4'
gives me an error:
C:/Ruby187/lib/ruby/site_ruby/1.8/rubygems.rb:926:in…

Azimkhan
- 330
- 3
- 7
1
vote
1 answer
Strange treeview behaviour: strikeout text only if bold
I need to show some treeview item text striked out text into a QT treeview from Ruby.
After some reading on QT documentation and much coding, I found that only when rendering font in bold, also the strikeout was rendered.
So I wonder, where I'm…

TuxmAL
- 53
- 1
- 8
1
vote
1 answer
Ruby Qt-bindings: How to pass variable to another window?
I'm trying to pass msgvar from show method in User_Info Class to show method in Call_Win Class. I'am getting stuck as I'm getting rubyv2/call_win.rb:4:in initialize: unresolved constructor call Call_Win (ArgumentError).
Main.rb
require…

reme
- 183
- 1
- 1
- 12
1
vote
1 answer
my own c++ qt library to be used in qtruby, qtpython etc
I'm starting an institute project. I'll try to create a "web-typograph", a tool that's to be used to correct texts (according to typographic rules of a language) before they're sent to the site. My choice is C++ with Qt because I'd like to create…

Yan Ivanov
- 196
- 15