Results 1 to 18 of 18

Thread: QString problem...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Posts
    34
    Thanks
    28
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: QString problem...

    BUMP

    Please help, please...

    If any additional information is required please request it

  2. #2
    Join Date
    Sep 2009
    Posts
    20
    Thanked 2 Times in 2 Posts

    Default Re: QString problem...

    Hi,

    Please try to use debugger, set up breakpoint at
    Qt Code:
    1. if (!path.isEmpty()){
    2. loaddatabase();
    To copy to clipboard, switch view to plain text mode 

    and check path value.

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

    Nefastious (26th September 2009)

  4. #3
    Join Date
    Jan 2008
    Location
    Davao City, Philippines
    Posts
    77
    Thanks
    16
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Red face Re: QString problem...

    Play with something like this ...

    Qt Code:
    1. void mainwindow::openfile()
    2. {
    3. // for testing only ....
    4. qDebug() << "we are in openfile() now";
    5.  
    6. path = QFileDialog::getOpenFileName(this, tr("Open Database File"), "/Users", tr("SQLite Database File (*.db)"));
    7.  
    8. qDebug() << path;
    9.  
    10. if ( !path.isEmpty() )
    11. {
    12. qDebug() << "path not empty";
    13. loaddatabase();
    14. }
    15. else
    16. {
    17. qDebug() << "path is empty";
    18. {
    19. }
    To copy to clipboard, switch view to plain text mode 

    Regards Guenther

  5. The following user says thank you to gboelter for this useful post:

    Nefastious (26th September 2009)

Similar Threads

  1. problem copying files and unmount drives
    By alejo in forum Qt Programming
    Replies: 2
    Last Post: 14th July 2009, 20:54
  2. Replies: 9
    Last Post: 6th May 2009, 10:09
  3. QString problem?
    By raphaelf in forum Newbie
    Replies: 7
    Last Post: 24th June 2008, 09:12
  4. char* to QString. Segfault after delete []
    By TheRonin in forum Qt Programming
    Replies: 9
    Last Post: 19th June 2008, 13:20
  5. QHash non-ANSI key problem
    By roxton in forum Qt Programming
    Replies: 4
    Last Post: 27th May 2008, 15:54

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.