Bugs: Browse | Submit New | Admin

[#13997] Qt::LCDNumber doesn't appear to accept styles or fonts

Date:
2007-09-17 00:03
Priority:
3
Submitted By:
Charles Hixson (charlesh)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Qt::LCDNumber doesn't appear to accept styles or fonts

Detailed description
The full example follows.  The lines that appear not be be working are the ones that start with:
      ###
N.B.:  No error message is produced if they are enabled, there just isn't any effect.
I'm running Debian etch with libqt4-ruby 1.4.7-1 (etc. current as of 08:00 PDT 2007/09/16)

class   TestWidget   <   Qt::Widget
   def   initialize(parent = nil)
      super

      quit   =   Qt::PushButton.new("Quit")
      quit.setGeometry(62, 40, 75, 30)
      quit.font   =   Qt::Font.new("Penguin Attack", 18, Qt::Font::Bold)
      connect(quit, SIGNAL("clicked()"), $qApp, SLOT("quit()"))

      lcd   =   Qt::LCDNumber.new(2)
      ####   Don't know why the following section doesn't work
      ###lcd.setSegmentStyle(Qt::LCDNumber::Filled)
      ###fontLCD   =   Qt::Font.new("Times", 18, Qt::Font::Bold)
      ###fontLCD.setWeight(75)
      ###lcd.setFont(fontLCD)
      
      slider   =   Qt::Slider.new(Qt::Horizontal)
      slider.setRange(0, 99)
      slider.value   =   0
      connect(slider, SIGNAL("valueChanged(int)"), lcd, SLOT("display(int)"))

      layout   =   Qt::VBoxLayout.new
      layout.addWidget(quit)
      layout.addWidget(lcd)
      layout.addWidget(slider)
      setLayout(layout)
   end   #   initialize
end   #   TestWidget

app   =  Qt::Application.new(ARGV)

widget=  TestWidget.new()
widget.show

Add A Comment: Notepad

Please login


Followup

Message
Date: 2007-10-23 21:37
Sender: Richard Dale

It seems to work fine with the version of QtRuby in the kde svn,
but I'm not sure what the bug might have been. The setSegmentStyle()
call changes the appearance of the LCD, but the setFont() call
has no effect because there is no text being displayed by the
LCD widget.

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item