December 17, 2010

smotiwala smotiwala
Lab Rat
28 posts

QLineEdit problem in Qt for Symbian

 

I’m working on Qt 4.6.3 for symbian. I have a problem with QLineEdit.

The scenario is, I have two QMainWindow, one QMainwindow have two QlineEdit and a QPushButton controls and other QMainWindow have QListWidget control.After opening and closing second QmMainWindow from first QMainWindow, the QLineEdit controls of first QMainWindow are uneditable. I want it editable.

Why it is uneditable after closing second QMainWindow. What should I do for making editable?

Thanks.

11 replies

December 17, 2010

stuk stuk
Ant Farmer
560 posts

Maybe is useful if you post the code.

December 17, 2010

Alexander Kuchumov Alexander Kuchumov
Lab Rat
377 posts

Why are you using two QMainWIndow?

December 17, 2010

smotiwala smotiwala
Lab Rat
28 posts

code is simple

on QMainWindow1 QPushButton clicked

  1. void QMainWindow1::onPushbuttonclick() {
  2.  QMainWindow2 *w2 = new QMainWindow2();
  3.  w2.showMaximised();
  4. }

and adding “this->close() on QMainWindow2

  1. void QMainWindow2::onExitclick() {
  2.  this->close()
  3. }

December 17, 2010

smotiwala smotiwala
Lab Rat
28 posts

I have used the second QmainWindow for user selection like popup dialog for selection of data. After selection user closes the second QMainWindow and that data will be transmit it to the first QMainWindow.

Kindly let me know if any other approach I use for popup selection.

Thanks in advance.

December 17, 2010

Alexander Kuchumov Alexander Kuchumov
Lab Rat
377 posts

Why not QDialog?

December 17, 2010

stuk stuk
Ant Farmer
560 posts

You can also use a QDialog [doc.trolltech.com] for this, if is only a forms that is close after the function.

smotiwala wrote:
I have used the second QmainWindow for user selection like popup dialog for selection of data. After selection user closes the second QMainWindow and that data will be transmit it to the first QMainWindow.

Kindly let me know if any other approach I use for popup selection.

Thanks in advance.

December 17, 2010

smotiwala smotiwala
Lab Rat
28 posts

Thanks. do you have exampleto make custom QDialog in which I add QListWidget?

December 17, 2010

Volker Volker
Ant Farmer
5428 posts
smotiwala wrote:
Thanks. do you have exampleto make custom QDialog in which I add QListWidget?

It’s basically the same as with a QMainWindow.

December 17, 2010

smotiwala smotiwala
Lab Rat
28 posts

If it is same as QMainWindow then I guess it will also do the same as QMainWindow and QLineEdit problem persist

December 17, 2010

Volker Volker
Ant Farmer
5428 posts

Don’t guess – try :-)
Never heard of a closed QDialog that does not transfer keyboard focus back to its calling form.

December 17, 2010

smotiwala smotiwala
Lab Rat
28 posts

Ok i’ll try it. Thanks:)

 
  ‹‹ DevDays presentation on embedded development with Qt      Packaging extra folder and files in Qt for symbian? ››

You must log in to post a reply. Not a member yet? Register here!