Results 1 to 3 of 3

Thread: QDialog and Qtextedit

  1. #1
    Join Date
    Jul 2009
    Posts
    20
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default QDialog and Qtextedit

    Hi I am using a QTextedit for a an autocompleter .i display the search results in a QDialog with window flag QT:opup .
    However after i type the first character the focus shifts to popup , the textedit cursor disappears.

    This is not the case when i the window flag QT::Tooltip or framelesswindowhint.
    In QDialog i set the focuspolicy to no focus.

    How can i get the focus/cursor back to textedit ?

    Thankyou

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QDialog and Qtextedit

    i display the search results in a QDialog
    I guess that the results are in a QListWidget or similar in your popup dialog.
    If this is the case, you have to set the no focus policy on that widget, not the dialog.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jul 2009
    Posts
    20
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default Re: QDialog and Qtextedit

    Thanks, i tried but it does not make a difference while using the window hint QT:opup. Any more ideas?

Similar Threads

  1. QDialog
    By jayreddy in forum Qt Programming
    Replies: 5
    Last Post: 29th December 2009, 09:51
  2. closing a Qdialog called from a Qdialog
    By OverTheOCean in forum Qt Programming
    Replies: 3
    Last Post: 28th September 2009, 08:02
  3. How to "lock" a new qdialog in another qdialog
    By donglebob in forum Qt Programming
    Replies: 7
    Last Post: 4th February 2009, 08:37
  4. QDialog
    By seldeepchan in forum Qt Programming
    Replies: 1
    Last Post: 6th March 2008, 12:21
  5. Replies: 1
    Last Post: 16th February 2007, 07:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.