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. SIGSEGV in fromStdString
Forum Updated to NodeBB v4.3 + New Features

SIGSEGV in fromStdString

Scheduled Pinned Locked Moved Unsolved General and Desktop
23 Posts 7 Posters 3.6k Views 2 Watching
  • 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.
  • R Robert M.

    @Robert-M
    Using struct instead of QVector<QVariant> produced simpler and smaller code.
    What is adventage of using QVector<QVariant> instead of struct?

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

    @Robert-M
    A struct must contain a fixed number of named members with their own (quite possibly) different types.

    A vector/array allows a dynamic number of elements each of which must be of the same type (even if that is QVariant, which itself allows values with different underlying types).

    If your problem fits into the first case a struct is preferable, as seems to be the case here.

    1 Reply Last reply
    1
    • jsulmJ jsulm

      This post is deleted!

      R Offline
      R Offline
      Robert M.
      wrote on last edited by
      #22

      @jsulm
      I use other_options itself, not QVector<other_options>.

      Pl45m4P 1 Reply Last reply
      0
      • R Robert M.

        @jsulm
        I use other_options itself, not QVector<other_options>.

        Pl45m4P Offline
        Pl45m4P Offline
        Pl45m4
        wrote on last edited by
        #23

        @Robert-M said in SIGSEGV in fromStdString:

        other_options

        If other_options is your struct with your data, you want to send to your dialog, it's fine. Nobody said it's not :)
        The QVector would make it more variable


        If debugging is the process of removing software bugs, then programming must be the process of putting them in.

        ~E. W. Dijkstra

        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