Results 1 to 1 of 1

Thread: Unable to use an 'autosize' QlineEdit widget and layout.

  1. #1
    Join Date
    Sep 2010
    Posts
    654
    Thanks
    56
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Unable to use an 'autosize' QlineEdit widget and layout.

    I have created a custom widget extending QLineEdit. I want this is 'autosize'. Ok I get it using connect(this,SIGNAL(textChanged(QString)), this, SLOT(resizeLineEditToContents()));
    I have 2 of this widgets. The idea is that a resize of widget 1 is used by the horizontal layout where I have placed the two widgets to place rightly the widget 2.
    But it is impossible, I have played with all the policy possible value, without success.
    The layout tries always to adjust the size of my 'QLineEdit' widget .... (It happens also with a standard QlineEdit).
    Any help ? Thanks


    Solved . It is neccesary to use setfixedwidth().
    Last edited by tonnot; 14th February 2012 at 12:51.

Similar Threads

  1. how can i have QTableWidget with autosize row height
    By solook in forum Qt Programming
    Replies: 2
    Last Post: 19th September 2011, 08:49
  2. Qt Designer Unable to Add Layout in DocWidget/tabwidget.
    By akash in forum Qt Tools
    Replies: 1
    Last Post: 16th September 2011, 07:57
  3. Replies: 2
    Last Post: 2nd May 2011, 06:33
  4. mainwindow layout vs widget layout
    By fatecasino in forum Newbie
    Replies: 2
    Last Post: 14th December 2010, 14:45
  5. Replies: 4
    Last Post: 23rd December 2008, 20:41

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.