Results 1 to 4 of 4

Thread: cant open file newby problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default cant open file newby problem

    Hi, I have some old program in C implementing in Qt4, an I`m trying to open file with fopen, and it give me errors when i compile it:

    Qt Code:
    1. QString path, path2;
    2. FILE *vstup;
    3.  
    4. path2 = lineEdit->text();
    5. path = path2.section('/', -1); //it cuts from path to file the name of file name
    6.  
    7. vstup=fopen(path,"r");
    To copy to clipboard, switch view to plain text mode 
    The problem is in variable path, i don`t now how to convert it into right type for fopen. Thank`s you for any advice.
    Last edited by jpn; 27th January 2009 at 13:53. Reason: missing [code] tags

Similar Threads

  1. QDesktopServices open url & local file & pdf or doc
    By patrik08 in forum Qt Programming
    Replies: 9
    Last Post: 14th April 2012, 04:42
  2. Exclusive file creation (Samba shares)
    By marcel in forum General Programming
    Replies: 1
    Last Post: 13th April 2007, 12:26
  3. How to open a Pdf file from Qt
    By vishal.chauhan in forum Newbie
    Replies: 2
    Last Post: 28th March 2007, 08:24
  4. Qt 4.1.4 on VS2005 error- cannot open input file 'qtmain.lib'
    By Ashish in forum Installation and Deployment
    Replies: 10
    Last Post: 11th October 2006, 16:05
  5. QProcess open all file -> url.dll,FileProtocolHandler
    By patrik08 in forum Qt Programming
    Replies: 2
    Last Post: 26th June 2006, 17:07

Tags for this Thread

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.