Results 1 to 10 of 10

Thread: How to disable a QLineEdit?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2011
    Posts
    10
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    2

    Default Re: How to disable a QLineEdit?

    Hi tinysoft!

    Thank you very much. With your file and some work I found the problems:
    1) I was missing:
    Qt Code:
    1. in1->setDisabled(1);....
    To copy to clipboard, switch view to plain text mode 
    2)
    Qt Code:
    1. QWidget *widget = new QWidget;
    2. setCentralWidget(widget);
    To copy to clipboard, switch view to plain text mode 
    because of QMainWindow. QWidget, for example, is a member of it.
    and
    3) I removed the GroupBox and just used:
    Qt Code:
    1. QGridLayout *formLayout = new QGridLayout;
    2. ...
    3. widget->setLayout(formLayout);
    To copy to clipboard, switch view to plain text mode 

    Now everything works fine :-)!

    Thanks for your hints and have a nice day!

  2. #2
    Join Date
    Apr 2010
    Location
    Sudan
    Posts
    46
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    7
    Thanked 4 Times in 4 Posts

    Default Re: How to disable a QLineEdit?

    i'm glad that you solved it

    have a nice day u 2

Similar Threads

  1. Replies: 1
    Last Post: 12th October 2010, 23:20
  2. disable alt+tab
    By ahmdsd_ostora in forum Qt Programming
    Replies: 24
    Last Post: 11th July 2010, 10:40
  3. How to disable ALT + F4
    By elizabeth.h1 in forum Qt Programming
    Replies: 19
    Last Post: 22nd June 2010, 23:05
  4. disable myself when clicked
    By nifei in forum Qt Programming
    Replies: 6
    Last Post: 19th February 2009, 11:01
  5. Disable Tab Key
    By otortos in forum Newbie
    Replies: 6
    Last Post: 25th March 2006, 17:27

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.