Results 1 to 2 of 2

Thread: Global declaration

  1. #1
    Join Date
    Jan 2011
    Posts
    16
    Thanks
    2
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Global declaration

    My gui application contain 2 windows and i want to read the value from one window and use it in the other window.How am i supposed to declare a common Qstring variable for both the windows

  2. #2
    Join Date
    May 2010
    Location
    Romania
    Posts
    1,021
    Thanks
    62
    Thanked 260 Times in 246 Posts
    Qt products
    Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Global declaration

    Why not using signals and slots to pass a const reference*** from one window to the other.
    ***or value (shared by default) depend on what you need to do with the QString.

Similar Threads

  1. QtXml: xml declaration
    By Gopala Krishna in forum Newbie
    Replies: 1
    Last Post: 2nd June 2007, 12:12
  2. Declaration problems
    By scarvenger in forum Qt Programming
    Replies: 1
    Last Post: 7th May 2007, 02:05
  3. Declaration not working
    By kenny_isles in forum Newbie
    Replies: 1
    Last Post: 1st March 2007, 10:13
  4. Why forward declaration ?
    By probine in forum General Programming
    Replies: 3
    Last Post: 26th January 2007, 18:22
  5. declaration of global variables???
    By pranav_kavi in forum Newbie
    Replies: 6
    Last Post: 31st January 2006, 19:56

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.