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. Passing a Qt object from a function
Forum Updated to NodeBB v4.3 + New Features

Passing a Qt object from a function

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 747 Views 1 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.
  • C Offline
    C Offline
    ChrisW
    wrote on last edited by
    #1

    Hi,

    I'm trying to figure out a way to return a Qt object from a function such as a QPushButton. I think that it would be ideal to create buttons instead of me writing the same code over and over for 10+ buttons. I included an image so that you can see what I tried to do.

    http://i60.tinypic.com/29lbq7a.png

    J 1 Reply Last reply
    0
    • C ChrisW

      Hi,

      I'm trying to figure out a way to return a Qt object from a function such as a QPushButton. I think that it would be ideal to create buttons instead of me writing the same code over and over for 10+ buttons. I included an image so that you can see what I tried to do.

      http://i60.tinypic.com/29lbq7a.png

      J Offline
      J Offline
      jnguetsop
      wrote on last edited by
      #2

      Hi @ChrisW,

      The definition and the call to the method createButton seem correct. Can you show me the contents of the header file? Specifically the declaration of createButton method.

      C 1 Reply Last reply
      0
      • J jnguetsop

        Hi @ChrisW,

        The definition and the call to the method createButton seem correct. Can you show me the contents of the header file? Specifically the declaration of createButton method.

        C Offline
        C Offline
        ChrisW
        wrote on last edited by ChrisW
        #3

        @jnguetsop

        Hey!!

        Thanks a million. I was able to fix it. I didn't include the QtWidget Class in the header file.

        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