Results 1 to 2 of 2

Thread: QInputdialog doubt

  1. #1
    Join Date
    Nov 2014
    Location
    Chennai
    Posts
    160
    Thanks
    65
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QInputdialog doubt

    Qt Code:
    1. bool ok;
    2. QString text = QInputDialog::getText(this, tr("QInputDialog::getText()"),
    3. tr("Are you Sure,Do you Want to delete the Image ,Yes Or NO"), QLineEdit::Normal,
    4. QDir::home().dirName(), &ok);
    5. if (ok && !text.isEmpty())
    6. {
    7. //some action
    8. }
    To copy to clipboard, switch view to plain text mode 
    actually my above code executing properly..i have doubt in output of this Qinputdialog
    i getting output
    QInputDialog::getText()
    Are you Sure,Do you Want to delete the Image ,Yes Or NO
    from the user input i getting default input(username) i need user inputtext as empty..what was mistake in above code??
    please help me

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,230
    Thanks
    302
    Thanked 864 Times in 851 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: QInputdialog doubt

    What exactly are you trying to do here? Are you asking the user if he wants to delete something, or are you asking for the name of a directory?



    It would help you a lot if you read some of the Qt documentation and looked at some of the many, many examples and tutorials that come with Qt. Using this forum instead of Qt Assistant is not helping anyone.

Similar Threads

  1. doubt in Qinputdialog
    By iswaryasenthilkumar in forum Newbie
    Replies: 1
    Last Post: 22nd May 2015, 12:25
  2. Probelm With QInputDialog...
    By mishra.rakesh510 in forum Newbie
    Replies: 1
    Last Post: 31st January 2014, 10:25
  3. QInputDialog and OSG
    By Pertur in forum Qt Programming
    Replies: 3
    Last Post: 30th July 2010, 09:34
  4. How to use Qinputdialog in Symbian
    By ramesh.bs in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 2nd June 2010, 11:51
  5. QInputDialog
    By bkv in forum Newbie
    Replies: 2
    Last Post: 6th October 2006, 07:34

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.