Sha256: 510e355a0a8de427977092d2d2c29afec4d137e61834b3f6c8977b907804a3e6

Contents?: true

Size: 254 Bytes

Versions: 101

Compression:

Stored size: 254 Bytes

Contents

class QtWindow
  def self.doCenter(tha_window)
    qdw = Qt::DesktopWidget.new
    
    move_left = (qdw.width / 2) - (tha_window.width / 2)
    move_top = (qdw.height / 2) - (tha_window.height / 2)
    
    tha_window.move(move_left, move_top)
  end
end

Version data entries

101 entries across 101 versions & 1 rubygems

Version Path
knjrbfw-0.0.9 lib/knj/libqt_window.rb