[Bug 10850] Bug when selecting text in Qt 3 QLineEdit

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Dec 23 04:38:16 CST 2007


http://bugs.winehq.org/show_bug.cgi?id=10850





--- Comment #4 from Markus Gritsch <m.gritsch at gmail.com>  2007-12-23 04:38:16 ---
I added a third application to the .zip file (QLineEditSelectionChanged.exe)
which shows a bug which is probably caused by the same WINE bug.  The test
application has a QLineEdit and a QCheckBox.  Every time the text in the
lineedit is changed, the checkbox gets toggled.  The source code is displayed
at the end of this comment.

-> Except for the first time, every time one clicks with the mouse into the
lineedit, the textChanged() signal gets emitted (and thus the checkbox gets
toggled).  This is only observed under WINE, not on native Windows.

-> When switching to another window when the lineedit has the focus, an
additional textChanged signal is emitted.  This is also not the case on native
Windows.


#include <qapplication.h>

#include <qwidget.h>

#include <qlineedit.h>

#include <qcheckbox.h>

#include <qlayout.h>

#include <qobject.h>


int main(int argc, char ** argv)

{

    QApplication app = QApplication(argc, argv);


    QWidget * widget = new QWidget();

    QLineEdit * lineEdit = new QLineEdit(widget);

    QCheckBox * checkBox = new QCheckBox(widget);

    checkBox->setEnabled(false);

    QHBoxLayout * layout = new QHBoxLayout(widget, 1, 0, "layout");

    layout->addWidget(lineEdit);

    layout->addWidget(checkBox);

    QObject::connect(lineEdit, SIGNAL(textChanged(const QString &)),
                     checkBox, SLOT(toggle()));


    app.setMainWidget(widget);

    widget->show();

    return app.exec();

}


-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list