Strange bug with a Qt dialog ( Qt4.6/windows)
If the dialog is started from MainWindow (from a toolbar/or menu action) and it is modal none of the text boxes will accept any edits. Other controls (drop down, buttons etc) all work.
If I make the dialog non-modal, with show() rather than exec(), it works perfectly!
Anyone come across anything like this?
example code:
#include "ui_testDlg.h"
class TestDlg : public QDialog, public Ui::TestDlg
{
Q_OBJECT;
public:
TestDlg(QWidget *parent=0) {
setupUi(this);
}
~TestDlg(void) {}
private:
Ui::TestDlg ui;
};
TestDlg.ui is just the simplest dialog box + lineEdit control created in QDesigner.
void MainWindow::onTest()
{
TestDlg *test = new TestDlg(this);
test->show(); // works
//or
test->exec(); // opens dlg but can't type in it!
}
EDIT: It is the same problem if I just use a QInputWidget - and it is only a problem in MainWindow. So must be some signal I am blocking/consuming?