[Qt-interest] QT GUI, QTimeEdit

Irfan Omair irfan.omair.qt at gmail.com
Mon Aug 30 18:34:27 CEST 2010


Prakash,
Other simple way could be to use one api called setSpecialValueText(), that
should Do you job too.

Here is simple example.


#include <QtGui>

class mySpinBox : public QSpinBox

{

public:

mySpinBox()

{

setSpecialValueText("Hello:");

}

//void keyPressEvent(QKeyEvent *event)

//{

// qDebug()<<event->text();

// setSpecialValueText(event->text());

//}

};

int main ( int argc,char **argv )

{

QApplication app(argc,argv);

QWidget w;

QVBoxLayout *layout = new QVBoxLayout;

w.setLayout(layout);

mySpinBox *sp = new mySpinBox;

layout->addWidget(sp);

w.show();

return app.exec();

}


On Wed, Aug 25, 2010 at 7:56 PM, Kermit Mei <kermit.mei at gmail.com> wrote:

> On Wed, 2010-08-25 at 17:15 -0700, Mandaya Prakash wrote:
> > Is there any way i can insert some special character in QTimeEdit??
> >
> > Prakash
>
> I wrote a similar TimeEdit Widget by my self, you can reimplement
> QWidget::paintEvent(QPaintEvent *event) by yourself.
>
> B.R
> Kermit
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100830/f3022c87/attachment.html 


More information about the Qt-interest-old mailing list