class Qt::CoreApplication

Attributes

thread_fix[R]

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/Qt/qtruby4.rb, line 606
def initialize(*args)
  if args.length == 1 && args[0].kind_of?(Array)
    super(args.length + 1, [$0] + args[0])
  else
    super(*args)
  end
  $qApp = self
  @thread_fix = RubyThreadFix.new
end
translate(*args) click to toggle source
# File lib/Qt/qtruby4.rb, line 639
def self.translate(*args)
  if args[3] and args[3].value == Qt::Application::UnicodeUTF8.value
    return method_missing(:translate,*args).force_encoding('utf-8')
  else
    return method_missing(:translate,*args)
  end
end

Public Instance Methods

disable_threading() click to toggle source
# File lib/Qt/qtruby4.rb, line 616
def disable_threading
  @thread_fix.stop if @thread_fix
  @thread_fix = nil
end
exec() click to toggle source

Delete the underlying C++ instance after exec returns Otherwise, rb_gc_call_finalizer_at_exit() can delete stuff that Qt::Application still needs for its cleanup.

# File lib/Qt/qtruby4.rb, line 624
def exec
  method_missing(:exec)
  disable_threading()
  self.dispose
  Qt::Internal.application_terminated = true
end
exit(*args) click to toggle source
# File lib/Qt/qtruby4.rb, line 635
def exit(*args)
  method_missing(:exit, *args)
end
type(*args) click to toggle source
# File lib/Qt/qtruby4.rb, line 631
def type(*args)
  method_missing(:type, *args)
end