Results 1 to 3 of 3

Thread: maximum size of QLineEdit with setMaxLength()

  1. #1
    Join Date
    Aug 2018
    Posts
    2
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default maximum size of QLineEdit with setMaxLength()

    I have a text which i need to fit in a QLineEdit.
    The problem is the text is about 6.6 million characters long.
    So now i set the max length of the QLineEdit to 10 million Characters like this:

    lineEdit_example->setMaxLength(10000000);

    But even if i set even larger limits, the text will get cut of at about 1/6th of the text length. So I think there is a upper limit for said function, which is not talked about in the documentation.

    Could someone confirm my problem and maybe provide me with an solution/ workaround?

    Help is much appreciated

  2. #2
    Join Date
    Jul 2008
    Posts
    379
    Thanks
    9
    Thanked 47 Times in 45 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: maximum size of QLineEdit with setMaxLength()

    Hi, with a text that long, wouldn't it be more appropriate to use QTextEdit? 6 Million characters in a QLineEdit seems awfully long to me, without a scrollbar and so on.

    Ginsengelf

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

    MaxPowe (16th August 2018)

  4. #3
    Join Date
    Aug 2018
    Posts
    2
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: maximum size of QLineEdit with setMaxLength()

    It actually brings up some issues, but the described problem is solved like that.
    Thanks a lot for the help.

Similar Threads

  1. Maximum size of QStandardItemModel
    By jasonhxs in forum Qt Programming
    Replies: 2
    Last Post: 10th June 2015, 00:31
  2. The maximum size of a QList
    By Denarius in forum Newbie
    Replies: 3
    Last Post: 30th November 2012, 11:27
  3. Get maximum size a widget can get
    By joseprl89 in forum Qt Programming
    Replies: 0
    Last Post: 8th August 2011, 09:57
  4. Replies: 6
    Last Post: 27th July 2010, 22:07
  5. maximum size of xml files
    By freeskydiver in forum Qt Programming
    Replies: 1
    Last Post: 15th January 2008, 11:02

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.