Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. warning: padding size of 'model' with 4 bytes to alignment boundary
Forum Update on Monday, May 27th 2025

warning: padding size of 'model' with 4 bytes to alignment boundary

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 3.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    canid
    wrote on 28 Aug 2019, 03:46 last edited by
    #1

    warning: padding size of 'model' with 4 bytes to alignment boundary

    What does that mean

    J 1 Reply Last reply 28 Aug 2019, 05:40
    0
    • C canid
      28 Aug 2019, 03:46

      warning: padding size of 'model' with 4 bytes to alignment boundary

      What does that mean

      J Offline
      J Offline
      J.Hilk
      Moderators
      wrote on 28 Aug 2019, 05:40 last edited by
      #2

      @canid said in warning: padding size of 'model' with 4 bytes to alignment boundary:

      with 4 bytes to alignment boundary

      The compiler is telling you, that for reasons (can't say why exactly without seeing the class), he assigns additional 4 bytes of memory that will stay unused, when an instance of your class is created.

      Useful and needed information if you do low level operations on the class object- e.g direct memory access, or if you want to reduce memory consumption of your application


      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      4

      1/2

      28 Aug 2019, 03:46

      • Login

      • Login or register to search.
      1 out of 2
      • First post
        1/2
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved