[Qt-interest] delay during which a QPushButton remains holded down for an unknown reason
TP
paratribulations at free.fr
Sun Nov 7 12:52:06 CET 2010
Hello,
I have a problem with QPushButton: from time to time (say, 4 times for 50
clicks), it remains holded down for an unknown reason, during a time period
that can exceed one second (!).
Try the following code, and click the QPushButton 100 times, at regularly
interval (say, 0.5 second).
Platform: Linux Kubuntu 10.04 64 bits
Qt 4.6.2
#include <QtGui>
#include <QtCore>
int main( int argc, char * argv[] )
{
QApplication app( argc, argv );
QPushButton * pushbutton = new QPushButton( QString("click me") );
QDialog * dialog = new QDialog;
dialog->resize( 750, 550 );
QToolBar * toolbar = new QToolBar;
toolbar->addWidget( pushbutton );
QVBoxLayout * qvboxlayout = new QVBoxLayout( dialog );
qvboxlayout->addWidget( toolbar );
dialog->show();
app.exec();
}
Compilation:
gcc -lQtGui -lQtCore -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtGui -
I/usr/include/qt4 file.cpp
--
python -c "print ''.join([chr(154 - ord(c)) for c in '*9(9&(18%.\
9&1+,\'Z4(55l4('])"
"When a distinguished but elderly scientist states that something is
possible, he is almost certainly right. When he states that something is
impossible, he is very probably wrong." (first law of AC Clarke)
More information about the Qt-interest-old
mailing list