Results 1 to 8 of 8

Thread: Compile QFileDialog.h

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2007
    Posts
    628
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 89 Times in 87 Posts

    Default Re: Compile QFileDialog.h

    Quote Originally Posted by Qt Coder View Post
    Is there any way to differentiate between accepted and rejected signal of QInputDialog?
    Check this:
    Qt Code:
    1. int returnCode;
    2. returnCode = fileDialog->exec();
    3. if(returnCode == QDialog::Accepted)
    4. do something.
    5. if(returnCode == QDialog::Rejected)
    6. do something else.
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Mar 2009
    Posts
    116
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    1

    Default Re: Compile QFileDialog.h

    Its giving me error creating object of QInputDialog.
    Qt Code:
    1. ../../../include/QtGui/../../src/gui/dialogs/qinputdialog.h:70:
    2. QInputDialog::~QInputDialog()' is private
    To copy to clipboard, switch view to plain text mode 


    So I m using

    Qt Code:
    1. filepath = QInputDialog::getItem(NULL, tr("Select Image"),
    2. "", filenames, 0, false, &ok);
    To copy to clipboard, switch view to plain text mode 

    but to call
    Qt Code:
    1. fileDialog->exec();
    To copy to clipboard, switch view to plain text mode 

    I will have to instantiate QInputDialog........


    How to?

  3. #3
    Join Date
    Jan 2009
    Location
    Germany
    Posts
    131
    Qt products
    Qt3 Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    11
    Thanked 16 Times in 16 Posts

    Default Re: Compile QFileDialog.h

    Didnt you read the manual?: http://doc.trolltech.com/4.5/qinputdialog.html#getItem

    If ok is nonnull *a ok will be set to true if the user pressed OK and to false if the user pressed Cancel

Similar Threads

  1. how to compile c++ source file in qtCreator
    By orky7 in forum General Programming
    Replies: 6
    Last Post: 20th March 2009, 06:45
  2. Compile Application in XCode for Release. How?
    By Alex Snet in forum Installation and Deployment
    Replies: 7
    Last Post: 3rd February 2009, 09:16
  3. qtgui4.dll error in visual c++ 2005
    By Comptrol in forum Installation and Deployment
    Replies: 33
    Last Post: 19th June 2008, 07:18
  4. Access to PostgreSQL DB on a linux server
    By rmagro in forum Qt Programming
    Replies: 28
    Last Post: 13th March 2008, 09:02
  5. Use VC2005 to compile Qt program (4.3.0)
    By firegun9 in forum Qt Programming
    Replies: 3
    Last Post: 8th June 2007, 16:04

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.