[Kde-bindings] qtruby WFlags bugs?

Richard Dale Richard_Dale at tipitina.demon.co.uk
Tue Jun 29 10:49:16 UTC 2004


On Tuesday 29 June 2004 10:04, jm wrote:
> On 29/06/2004, at 6:02 PM, Alexander Kellett wrote:
> > On Tue, Jun 29, 2004 at 01:09:42AM -0700, Ashley Winters wrote:
> >  > --- jm <jm at transact.com.au> wrote:
> >  > > version: qtruby cvs 2004-06-22
> > > >
> > > > example code,
> > > >
> > > > #!/usr/local/bin/ruby
> > > >
> > > > require 'Qt'
> > > >
> > > > a = Qt::Application.new(ARGV)
> > > >
> > > > b = Qt::PushButton.new("abutton",nil)
> > > > a.setMainWidget(b)
> > > > b.show()
> > > >
> >  > > p a.getWFlags()  #<-- bug here
>
> OK, dumb user error. that should have been a b.getWFlags() which works.
> This started because I wish to turn off all window decorations (frame,
> title bar, etc). What's the best way to do this? I was searching
> trolltech and trying google - which was where I found mention of
> WFlags.
>
> > > Can't do that on your Qt::App. Perhaps you meant b.getWFlags()?
> >
> > switch debugging on and qtruby will print out the possible methods.
> >  major time saver, i make the above sort of bugs constantly be it
> > in ruby or c++ or newuberlanguagethatisperfect :P
>
> Found it.
>
> Qt::debug_level = Qt::DebugLevel::High
>
> thanks for the tip.
Another good way to find what's in the qtruby api, is to use the 'rbqtapi' 
tool, eg:

baldhead duke 1793% rbqtapi -rWStyle
        static Qt::WidgetFlags Qt::WStyle_ContextHelp()
        static Qt::WidgetFlags Qt::WStyle_Customize()
        static Qt::WidgetFlags Qt::WStyle_Dialog()
        static Qt::WidgetFlags Qt::WStyle_DialogBorder()
        static Qt::WidgetFlags Qt::WStyle_Mask()
        static Qt::WidgetFlags Qt::WStyle_Maximize()
        static Qt::WidgetFlags Qt::WStyle_MinMax()
        static Qt::WidgetFlags Qt::WStyle_Minimize()
        static Qt::WidgetFlags Qt::WStyle_NoBorder()
        static Qt::WidgetFlags Qt::WStyle_NoBorderEx()
        static Qt::WidgetFlags Qt::WStyle_NormalBorder()
        static Qt::WidgetFlags Qt::WStyle_Reserved()
        static Qt::WidgetFlags Qt::WStyle_Splash()
        static Qt::WidgetFlags Qt::WStyle_StaysOnTop()
        static Qt::WidgetFlags Qt::WStyle_SysMenu()
        static Qt::WidgetFlags Qt::WStyle_Title()
        static Qt::WidgetFlags Qt::WStyle_Tool()

 Enums like WidgetFlags appear as method calls.

-- Richard



More information about the Kde-bindings mailing list