Hi all,
I've found an easily reproducible crashing bug in Qt-4.5.0-tp1 (MacOS/
X version... I haven't tested under any other OS's).
To reproduce the crash:
1) Compile the program below
2) Run the program
3) Drag the QSplitter bar all the way to the bottom of the window (so
that the QPlainTextEdit has height=0, aka is hidden)
4) Click the labelled button two or three times
5) Crash-ola!
-Jeremy
--------------- begin main.h -----------------------
#ifndef main_h
#define main_h
#include <QMainWindow>
class QPlainTextEdit;
class TestWindow : public QMainWindow
{
Q_OBJECT
public:
TestWindow();
private slots:
void TopButtonClicked();
private:
QPlainTextEdit * _plainTextEdit;
};
#endif
--------------- begin main.cpp ----------------------
#include "main.h"
#include <QApplication>
#include <QPushButton>
#include <QSplitter>
#include <QPlainTextEdit>
TestWindow :: TestWindow()
{
QSplitter * sp = new QSplitter(Qt::Vertical, this);
setCentralWidget(sp);
QPushButton * topButton = new QPushButton("Drag the splitter all
the way down,\n(i.e. so that only the other widget is completely
hidden)\nthen click me several times in a row to crash!");
connect(topButton, SIGNAL(clicked()), this,
SLOT(TopButtonClicked()));
sp->addWidget(topButton);
_plainTextEdit = new QPlainTextEdit;
_plainTextEdit->setReadOnly(true);
sp->addWidget(_plainTextEdit);
}
void TestWindow :: TopButtonClicked()
{
_plainTextEdit->setPlainText("This external lets you run a Python
Script directly. You can either paste a small Python script directly
into the text box provided above, or add your .py file to the Support
Files window and specify the file's name here. This is different from
the 'Send Command to Python Script' external, in that that external
sends a message to a Python process that is already running, whereas
this external launches the specified script quietly in the
background. Note that scripts run via this external will not show up
in the Script Execution window.\n\nf0 1f 7e 31 00 1e 7f 7f 50 59 54 48
4f 4e 41 52 47 53 20 73 75 70 70 6f 72 74 66 69 6c 65 3d 22 6d 79 5f
73 63 72 69 70 74 2e 70 79 22 0a 00 2e f7");
}
int main(int argc, char ** argv)
{
QApplication a(argc, argv);
QApplication::setDesktopSettingsAware(false);
TestWindow w;
w.resize(500,500);
w.show();
return a.exec();
}
_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback