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. serializeing QColor in a subdirs project.
Forum Updated to NodeBB v4.3 + New Features

serializeing QColor in a subdirs project.

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 489 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.
  • J Offline
    J Offline
    JoeJoe_000
    wrote on last edited by
    #1

    When you have a subdirs project and you need to save a QColor from your GUI frontend, you can't because QColor is QT += gui. I know the work around would be to save them as integers in a list or something of that nature. I'm wondering how others have dealt with this.

    jsulmJ 1 Reply Last reply
    0
    • J JoeJoe_000

      When you have a subdirs project and you need to save a QColor from your GUI frontend, you can't because QColor is QT += gui. I know the work around would be to save them as integers in a list or something of that nature. I'm wondering how others have dealt with this.

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @JoeJoe_000 I don't understand: where in your subdirs project do you want to serialize QColor? If you want to use QColor then you need "QT += gui" - what is the problem with that? Can you explain better your use case?

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • J Offline
        J Offline
        JoeJoe_000
        wrote on last edited by
        #3

        I guess there's no problem with that....

        J.HilkJ 1 Reply Last reply
        0
        • J JoeJoe_000

          I guess there's no problem with that....

          J.HilkJ Offline
          J.HilkJ Offline
          J.Hilk
          Moderators
          wrote on last edited by J.Hilk
          #4

          @JoeJoe_000 QColor has it its core a QRGB and that stores it values in a int32, IIRC you should be able to simply cast from one into the other and create a QColor from QRGB and extract QRGB from QColor


          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.

          J 1 Reply Last reply
          3
          • J.HilkJ J.Hilk

            @JoeJoe_000 QColor has it its core a QRGB and that stores it values in a int32, IIRC you should be able to simply cast from one into the other and create a QColor from QRGB and extract QRGB from QColor

            J Offline
            J Offline
            JoeJoe_000
            wrote on last edited by
            #5

            @J-Hilk said in serializeing QColor in a subdirs project.:

            core a QRGB and that stores it values in a int32, IIRC you should be able to simply cast from one into the other and create a QColor from QRGB and extract QRGB from QColor

            okay thank you I'll try that.

            1 Reply Last reply
            0

            • Login

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