Results 1 to 2 of 2

Thread: QLineEdit with multiple strings by default.

  1. #1
    Join Date
    Mar 2015
    Posts
    105
    Thanks
    50

    Default Re: QLineEdit with multiple strings by default.

    Hello!

    I'm using PyQT Designer and I would like to know which widget I have to use to get strings from user(like QLineEdit) but with multiples lines of strings setted by default. I mean, like when you click in your url field in your webbrowser and you get your history. I want the same thing, then when the user click on one of these strings something hapens. Or he could type his own string.

    If QLineEdit doest that how can I set those default strings?


    Added after 1 52 minutes:


    I don't know if is the proper solution but I think I found.

    QComboBox setted as editable. If you have any suggestion, maybe this is not the best solution...
    Last edited by robgeek; 24th June 2019 at 02:51.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: QLineEdit with multiple strings by default.

    QComboBox is definitely a viable choice.

    Another option is to use a QLineEdit and a QCompleter
    Cheers,
    _

Similar Threads

  1. Read multiple QlistWidget items to strings
    By Cyrebo in forum Qt Programming
    Replies: 3
    Last Post: 29th March 2013, 01:32
  2. How to add multiple strings to a spinner
    By athulms in forum Newbie
    Replies: 4
    Last Post: 28th July 2011, 12:46
  3. How to add multiple strings to a spinner
    By athulms in forum Qt Quick
    Replies: 0
    Last Post: 28th July 2011, 08:36
  4. how to add multiple strings into the spinner
    By vinayaka in forum Qt Quick
    Replies: 3
    Last Post: 27th July 2011, 12:55
  5. Replies: 1
    Last Post: 7th May 2010, 16:01

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.