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

  • Home
  • SEARCH
  • 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 8284707
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T11:12:24+00:00 2026-06-08T11:12:24+00:00

I have a structure with a lot of dynamic (QVectors) and static fields and

  • 0

I have a structure with a lot of dynamic (QVectors) and static fields and I need to serialize it. I’m willing to use this: http://www.developer.nokia.com/Community/Wiki/Qt_Object_Serialization

but there’s a field in this structure that I need but I don’t want it to be serialized, any suggestion how to avoid it?

  • 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-06-08T11:12:27+00:00Added an answer on June 8, 2026 at 11:12 am

    To implement serialization, you’ll be defining the << and >> operators for QDataStream + your data structure. So just don’t write the field you don’t want serialized!

    Edit: What you have to do to get a custom class to serialize:

    class MyClass
    {
        int member1;
        int member2; // <- Don't serialize me!
        int member3;
    
    public:
        //Constructors and methods and bears (oh my!)...
    
        friend operator << (QDataStream& stream, const MyClass& myclass)
        {
            //Don't write member2:
            return stream << myclass.member1 << myclass.member3;
        }
    
        friend operator >> (QDataStream& stream, MyClass& myclass)
        {
            //Don't read it, either:
            return stream >> myclass.member1 >> myclass.member3;
        }
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a lot of web pages that use the same exact html structure.
I have a really big data structure with a lot of fields in it.
I have structure like this. <ul class=gallerylist> <li> <image ...> <input ...> </li> <li>
I have a structure like this struct structure { BaseObject &A; //BaseObject has a
I have this structure: Activity A has a ViewPager. The pages of a ViewPager
I just noticed my code repeats this structure a lot: if( someErrorHappened ){ string
I have a dom structure that looks something like (although a lot more complex)
I have this data structure (basically): (setq ssm-list '(tasklist ((id . 10525295) (name .
I'm having difficulties parsing a string. This is the structure I have: Title:Avatar,Year:2009,Rated:PG-13,Released:18 Dec
I have the following MySQL structure (minimized a lot): CREATE TABLE `site_movies` ( `id`

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.