Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6831131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:42:04+00:00 2026-05-26T22:42:04+00:00

QIODevice and the related classes use qint64 for positions and sizes which is a

  • 0

QIODevice and the related classes use qint64 for positions and sizes which is a signed datatype. Is there a need to express negative values? Because otherwise the 8 bytes of such a type could be used to express greater sizes, couldn’t they?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:42:05+00:00Added an answer on May 26, 2026 at 10:42 pm

    An error value of -1 is returned for several functions in QIODevice. Qt often uses a C style of error handing using return values to avoid the need for a compiler or platform that supports the use of C++ exceptions. It is important to check for these error codes.

    From the manual:

    • QIODevice::write and QIODevice::writeData

      Returns the number of bytes that were actually written, or -1 if an error occurred.

    • QIODevice::read(char*,qint64)

      If an error occurs, … this function returns -1.

    • QIODevice::readData(char*,qint64)

      … and returns the number of bytes read or -1 if an error occurred.

    • QIODevice::peek(char*,qint64)

      If an error occurs, … this function returns -1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to develop a Qt App using 4.7.3 which involves the writing
In Qt I need to send a sqlite file (binary file) up to a
I am trying to use QSerialDevice in Qt to get a connection to my
I am working on an application which uploads the content of the file to
int main (int argc, char* argv[]) { QApplication app(argc, argv); QTextStream cout(stdout, QIODevice::WriteOnly); //
I'm downloading a file using QNetworkAccessManager::get but unlike QHttp::get there's no built-in way to
I have a file which has absolute filepaths listed, 1 per line. The listed
I would like to get QIODevice that represents standard IO streams ( stdin ,
How to I make the output of a QIODevice ( QProcess , specifically) go
I jsut installed Qt 4.7.2 and I'm trying to use the QLibraryInfo class. My

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.