This section needs improvements: Please help us to
Remove example that does not work
cleanup confusing sections and
fix sections which contain a todo
Really? So let's try with defaults.ui, that is corresponding UI file in recent post.
require 'Qt4'
require 'qtuitools'
UI_FILES_PATH = "/opt/qtsdk-2009.01/qt/examples/widgets/stylesheet/layouts"
Qt::Application.new(ARGV) do
file = Qt::File.new("#{UI_FILES_PATH}/default.ui")
file.open(Qt::File::ReadOnly)
window = Qt::UiLoader.new.load(file, nil)
file.close
window.show
exec
end
This code block is saved as file named "ui_loader_example.rb". Then execute this.
>/opt/ruby-1.9.1/bin/ruby ui_loader_example.rb
ui_loader_example.rb:2:in `require': no such file to load -- qtuitools (LoadError)
from ui_loader_example.rb:2:in `<main>'
It fails, but unexpected way. to be continued...
No comments:
Post a Comment