Results 1 to 3 of 3

Thread: QCompleter with horizontal ScrollBar

  1. #1
    Join Date
    Dec 2008
    Location
    PUNE (INDIA)
    Posts
    49
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QCompleter with horizontal ScrollBar

    Hi all Experts ,
    I am developing an application, in which i have to use a QCompleter .
    QStringList wordList;
    wordList << "University Of Pune , Pune 7" << "University Of Mumbai , Mumbai 2" << "Delhi University, Delhi 6" << "University Of Bhopal , Bhopal 9";

    QLineEdit *lineEdit = new QLineEdit(this);
    QCompleter *completer = new QCompleter(wordList, this);
    completer->setCaseSensitivity(Qt::CaseInsensitive);
    completer->setCompletionMode(QCompleter::UnfilteredPopupComp letion);
    lineEdit->setCompleter(completer);
    The QCompleter provides a vertical scrollBar by default. Is there any way to attach a horizontal scrollBar to the QCompleter.
    Just Give me a hint.
    Thanks & Regards ,

    Vajindar Laddad .
    Trainee Developer.
    (INDIA).
    91+9325014248

  2. #2
    Join Date
    Feb 2008
    Posts
    98
    Thanks
    2
    Thanked 24 Times in 24 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCompleter with horizontal ScrollBar

    Qt Code:
    1. completer->popup()->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOn );
    To copy to clipboard, switch view to plain text mode 
    Last edited by victor.fernandez; 28th August 2009 at 13:50.

  3. The following user says thank you to victor.fernandez for this useful post:

    vajindarladdad (31st August 2009)

  4. #3
    Join Date
    Dec 2008
    Location
    PUNE (INDIA)
    Posts
    49
    Thanks
    11
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QCompleter with horizontal ScrollBar

    Thanks a million Victor........
    Thanks & Regards ,

    Vajindar Laddad .
    Trainee Developer.
    (INDIA).
    91+9325014248

Similar Threads

  1. How to add a horizontal scrollbar to a treeview?
    By yangyunzhao in forum Qt Programming
    Replies: 1
    Last Post: 20th August 2009, 08:24
  2. QTreeWidget horizontal scrollbar
    By ttvo in forum Qt Programming
    Replies: 1
    Last Post: 16th July 2009, 16:44
  3. Horizontal scrollbar problem
    By blaylockr in forum Newbie
    Replies: 2
    Last Post: 21st July 2008, 17:38
  4. GraphicsView/GraphicsScene: scrollbar policy Qt::ScrollBarAsNeeded
    By Pieter from Belgium in forum Qt Programming
    Replies: 4
    Last Post: 21st March 2007, 13:15
  5. Horizontal scrollbar tracking problem
    By tebessum in forum Qt Programming
    Replies: 1
    Last Post: 23rd December 2006, 23:15

Tags for this Thread

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.