Results 1 to 11 of 11

Thread: How to use an external variable ?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: How to use an external variable ?

    does your .pro file anything more than this?
    Qt Code:
    1. HEADERS += \
    2. data.h
    3.  
    4. SOURCES += \
    5. data.cpp \
    6. main.cpp
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Nov 2010
    Posts
    63
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    26
    Thanked 1 Time in 1 Post

    Default Re: How to use an external variable ?

    My project file looks like this:

    Qt Code:
    1. #-------------------------------------------------
    2. #
    3. # Project created by QtCreator 2010-11-25T17:13:18
    4. #
    5. #-------------------------------------------------
    6.  
    7. QT += core gui
    8.  
    9. TARGET = Test
    10. TEMPLATE = app
    11.  
    12.  
    13. SOURCES += main.cpp\
    14. mainwindow.cpp \
    15. data.cpp \
    16. ssvector.cpp
    17.  
    18. HEADERS += mainwindow.h \
    19. data.h \
    20. ssvector.h
    21.  
    22. FORMS += mainwindow.ui
    To copy to clipboard, switch view to plain text mode 

    For the current test I've outcommented all calls to mainwindow and ssvector (in the source code), as they were from earlier tests and were only still in there for later use.

  3. #3
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 453 Times in 435 Posts
    Wiki edits
    15

    Default Re: How to use an external variable ?

    test with the .pro file posted my me...

Similar Threads

  1. variable
    By Atuti2009 in forum Qt Programming
    Replies: 8
    Last Post: 18th November 2009, 10:04
  2. Signal from variable
    By waynew in forum Newbie
    Replies: 2
    Last Post: 18th November 2009, 02:18
  3. QT and variable scope
    By tommy in forum Qt Programming
    Replies: 1
    Last Post: 29th November 2007, 22:32
  4. Getting Type of an variable
    By hgedek in forum Qt Programming
    Replies: 1
    Last Post: 9th September 2007, 16:37
  5. global variable
    By Shuchi Agrawal in forum General Programming
    Replies: 10
    Last Post: 15th February 2007, 05:19

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.