Hello,

I found out that can not see numbers in QSpinbox in all application created
with QT4 (4.8.4 openSUSE 12.2). Other common widgets looks ok. I know it
was ok in past, but I can not find reason what cause this (installation of
some font, or QT5???).

I thought problem is in used font for QSpinbox so I created simple test
application, but setting font have no effect. When I compile the same
application with QT5 numbers are ok. Here is my code:

  QApplication app(argc,argv);


  QSpinBox* mySpinBox = new QSpinBox();

  mySpinBox->setWindowTitle("QSpinBox Text Size");

  mySpinBox->setFixedSize(150,50);

  mySpinBox->setValue(50);


  QFont* font = new QFont();

  font->fromString("Serif,0,25,30,75,0,0,0,0,0");

  mySpinBox->setFont(*font);


  qDebug()  << "style:" << mySpinBox->style();

  QFont fontDebug = mySpinBox->font();

  qDebug() << "QFontInfo:" << QFontInfo(fontDebug).family();

  qDebug() << "fontDebug:" << fontDebug.toString();

  qDebug() << "styleSheet:" << mySpinBox->styleSheet();

  mySpinBox->show();

  return app.exec();


QT4 debug output:

style: QPlastiqueStyle(0xa188e0, name = "plastique")

QFontInfo: "Times New Roman"

fontDebug: "Serif,-1,25,30,75,0,0,0,0,0"

styleSheet: ""

QT5 debug output:

style: 0x109d050

QFontInfo: "Times New Roman"

fontDebug: "Serif,-1,25,30,75,0,0,0,0,0"

styleSheet: ""

I tried to remove user configuration (~/.config) but it did not help. I
tried to run application under other user account but it did not help. It
looks like there is some system-wide setting that cause this.

Do you have any idea how to identified where is problem?

Zdenko

<<attachment: QSpinbox-Qt5.png>>

<<attachment: QSpinbox-Qt4.png>>

_______________________________________________
Interest mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to