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. Making arrays with Qt
Forum Updated to NodeBB v4.3 + New Features

Making arrays with Qt

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 3 Posters 405 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.
  • K Offline
    K Offline
    Kris Revi
    wrote on last edited by
    #1

    stupid question but still asking, i know that QArray is no longer in Qt so the option is QVector

    Question is, can i make this (Python array)

            self.board = {
                'Studio Lights':{'Name':'Studio Lights', 'UVVisible':False,  'ip':'192.168.10.138',  'Status':'Online',  'Active':'Off'},
                'Neon Heaven':{'Name':'Neon Heaven', 'UVVisible':True,  'ip':'192.168.10.146',  'Status':'Online',  'Active':'Off'},
                'Vitrineskap':{'Name':'Vitrineskap', 'UVVisible':False,  'ip':'vitrineskap',  'Status':'Online',  'Active':'Off'},
                'Voodoo Mask': {'Name': 'TestMachine', 'UVVisible': False, 'ip': 'test123', 'Status': 'Online','Active': 'Off'}
            }
    

    with Qvector and how? is QVector exactly as QArray/Array? or

    JonBJ 1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Kris-Revi said in Making arrays with Qt:

      can i make this (Python array)

      this is no array, it's a dict with subdicts.
      You have to create a structure for this - but I don't see anything Qt specific here, more C basics - https://www.tutorialspoint.com/cprogramming/c_structures.htm

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      K 1 Reply Last reply
      2
      • K Kris Revi

        stupid question but still asking, i know that QArray is no longer in Qt so the option is QVector

        Question is, can i make this (Python array)

                self.board = {
                    'Studio Lights':{'Name':'Studio Lights', 'UVVisible':False,  'ip':'192.168.10.138',  'Status':'Online',  'Active':'Off'},
                    'Neon Heaven':{'Name':'Neon Heaven', 'UVVisible':True,  'ip':'192.168.10.146',  'Status':'Online',  'Active':'Off'},
                    'Vitrineskap':{'Name':'Vitrineskap', 'UVVisible':False,  'ip':'vitrineskap',  'Status':'Online',  'Active':'Off'},
                    'Voodoo Mask': {'Name': 'TestMachine', 'UVVisible': False, 'ip': 'test123', 'Status': 'Online','Active': 'Off'}
                }
        

        with Qvector and how? is QVector exactly as QArray/Array? or

        JonBJ Offline
        JonBJ Offline
        JonB
        wrote on last edited by JonB
        #3

        @Kris-Revi said in Making arrays with Qt:

        i know that QArray is no longer in Qt
        is QVector exactly as QArray/Array?

        Adding to @Christian-Ehrlicher

        What is that QArray? And I don't see why you would to make a QVector of this, unless you have some specific reason?

        1 Reply Last reply
        0
        • Christian EhrlicherC Christian Ehrlicher

          @Kris-Revi said in Making arrays with Qt:

          can i make this (Python array)

          this is no array, it's a dict with subdicts.
          You have to create a structure for this - but I don't see anything Qt specific here, more C basics - https://www.tutorialspoint.com/cprogramming/c_structures.htm

          K Offline
          K Offline
          Kris Revi
          wrote on last edited by Kris Revi
          #4

          @Christian-Ehrlicher you are right xD it is a struct! me so sowyh, me not think! xD

          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