Results 1 to 5 of 5

Thread: Writing text file in execlusive mode

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2010
    Location
    Luxembourg
    Posts
    5
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    1

    Default Re: Writing text file in execlusive mode

    But also setting permissions will not help me.
    I launch my qt program which write the file and I can also open it with an other program.

    In Windows you can create a file with execlusiv rights, that's what I want to do with QT

  2. #2
    Join Date
    Apr 2010
    Posts
    769
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11
    Thanks
    1
    Thanked 94 Times in 86 Posts

    Default Re: Writing text file in execlusive mode

    I don't know what 'exclusive rights' are, but someone - usually the owner, sometimes others - will always be able to read/write a file they've created. Any program that creates files in my user space that I am unable to manipulate is a program that will be headed to the trash heap in an instant.

    If you can't set file permissions (and that's what they are) to what you'd like them to be using QFile, make a system call to the Windows API.

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Writing text file in execlusive mode

    I think he means a mandatory lock. That's possible for Windows but not for Linux since locking is not mandatory there on most filesystems.

    http://doc.trolltech.com/solutions/4...ockedfile.html
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Writing the text within a text edit to a file
    By Splatify in forum Newbie
    Replies: 4
    Last Post: 23rd February 2011, 22:48
  2. writing to a text-file
    By QtBros61 in forum Newbie
    Replies: 7
    Last Post: 9th April 2010, 11:15
  3. Writing raw bytes as text?
    By DiamonDogX in forum Qt Programming
    Replies: 1
    Last Post: 18th May 2009, 16:56
  4. problem in writing text with QFile
    By wei243 in forum Qt Programming
    Replies: 5
    Last Post: 6th March 2007, 14:26
  5. Writing Text on a Rectangle!!!
    By Kapil in forum Qt Programming
    Replies: 3
    Last Post: 17th May 2006, 10:23

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.