-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
None
-
None
When pressing an arrow key in a QLineEdit hosted in a Windows Forms window will cause the focus to change, whereas it should navigate within the text for the QLineEdit
Patch to reproduce the problem:
==== //depot/addons/main/windows/qtwinforms/examples/qtclock/mainwindow.cpp#6 - c:\work\depot\addons\main\windows\qtwinforms\
examples\qtclock\mainwindow.cpp ====
@@ -1,14 +1,16 @@
+#include <QLineEdit>
+
#include "mainwindow.h"
MainWindow::MainWindow()
{
SuspendLayout();
-
+
clock = new AnalogClock();
clockHost = gcnew QtWidgetHost(clock);
clockHost->Anchor = AnchorStyles::None;
clockHost->Dock = DockStyle::Fill;
-
+
timePicker = gcnew DateTimePicker();
timePicker->Anchor = AnchorStyles::Right;
timePicker->ShowUpDown = true;
@@ -19,7 +21,10 @@
button->Anchor = AnchorStyles::Left;
button->Text = L"Set time";
button->Click += gcnew System::EventHandler(this, &MainWindow::button_Click);
-
+
+ QLineEdit* lineEdit = new QLineEdit();
+ QtWidgetHost^ lineEditHost = gcnew QtWidgetHost(lineEdit);
+
TableLayoutPanel ^layout = gcnew TableLayoutPanel();
layout->SuspendLayout();
layout->Dock = DockStyle::Fill;
@@ -33,7 +38,8 @@
layout->SetColumnSpan(clockHost, 2);
layout->Controls->Add(timePicker, 0, 1);
layout->Controls->Add(button, 1, 1);
-
+ layout->Controls->Add(lineEditHost, 1, 2);
+
Controls->Add(layout);
layout->ResumeLayout(false);
ResumeLayout(false);
- is replaced by
-
QTSOLBUG-81 When pressing an arrow key in a QLineEdit hosted in a Windows Forms window will cause the focus to change
-
- Closed
-