Results 1 to 17 of 17

Thread: How to remove Scroll bar of QCombo Box

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: How to remove Scroll bar of QCombo Box

    Quote Originally Posted by RENOLD View Post
    for (int i = 0; i < stringList.size(); i++)
    {
    if(i==stringList.size()-1)
    {
    lineEditBox->clear();
    lineEditBox->setText(stringList.at(i));
    }
    }
    I don't try to find nice words: This horrible. Do you understand what this code does? Do you really think you need a loop to set the last word of an array to your line edit. Also why are you clearing the edit before setting a new text? With setting a new text, line edit clears itself automatically.

  2. #2
    Join Date
    Feb 2012
    Posts
    27
    Thanked 2 Times in 2 Posts

    Default Re: How to remove Scroll bar of QCombo Box

    Yes lykurg I complete my task using this....
    If you have any other simple suggestion then please write it.....

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to remove Scroll bar of QCombo Box

    Hmm... what is the purpose of this line?

    Qt Code:
    1. QStringList stringList= p.split("",QString::SkipEmptyParts);
    To copy to clipboard, switch view to plain text mode 
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  4. #4
    Join Date
    Feb 2012
    Posts
    27
    Thanked 2 Times in 2 Posts

    Default Re: How to remove Scroll bar of QCombo Box

    http://www.qtcentre.org/threads/4584...ghlight=qDebug

    I got this solution from above thread.....

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,018 Times in 4,794 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: How to remove Scroll bar of QCombo Box

    But this "solution" does something much different than your code. So again, why did you put this line there?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. How we increase the width of Scroll bar of QCombo Box
    By rajeshclt3 in forum Qt Programming
    Replies: 6
    Last Post: 16th August 2011, 09:53
  2. Set Default text in QCombo box
    By daarsh in forum Qt Programming
    Replies: 2
    Last Post: 11th April 2011, 10:38
  3. Need help on setting up Defult text on QCombo box
    By Askar in forum Qt Programming
    Replies: 3
    Last Post: 23rd February 2011, 10:50
  4. QDial disabling key scroll and mouse wheel scroll
    By ldg20 in forum Qt Programming
    Replies: 2
    Last Post: 2nd June 2010, 23:05
  5. Qcombo box
    By nErnie in forum Qt Programming
    Replies: 3
    Last Post: 17th September 2006, 00:56

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.