Results 1 to 9 of 9

Thread: Session question

  1. #1
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    111
    Thanked 4 Times in 4 Posts

    Red face Session question

    Hi to all!

    With QtCreator I've setup a session with 4 projects inside of it. These 4 projects share following files:

    • files regarding common QSettings dervived CApplicationSettings (since all modules read settings from INI file, created by custom settings editor)
    • "factory" settings (if INI files is not present), stored in globals.h and some other header files

    How do I now put these "common" files into session?

    Thank you in advance,
    Marko
    Qt 5.3 Opensource & Creator 3.1.2

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Session question

    A session is merely a set of projects that are restored when you bring back the session. The projects don't have to have anything in common. If you want to share some things among projects, in each of the projects include a .pri file listing all the shared files.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    MarkoSan (1st July 2009)

  4. #3
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    111
    Thanked 4 Times in 4 Posts

    Default Re: Session question

    Quote Originally Posted by wysota View Post
    A session is merely a set of projects that are restored when you bring back the session. The projects don't have to have anything in common. If you want to share some things among projects, in each of the projects include a .pri file listing all the shared files.
    Can you provide some example of .pri file?
    Qt 5.3 Opensource & Creator 3.1.2

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Session question

    It's a .pro file only with a different extension marking that it serves as an included object. Simply add files to the SOURCES and HEADERS variables.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #5
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    111
    Thanked 4 Times in 4 Posts

    Default Re: Session question

    Ok, but do I make directory "Common" with New Project Tool (from QtCreator) or I simply make directory and there dispose common files?
    Qt 5.3 Opensource & Creator 3.1.2

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Session question

    You don't make a new project. If you want a directory, create it but it is not required.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. The following user says thank you to wysota for this useful post:

    MarkoSan (1st July 2009)

  9. #7
    Join Date
    Jan 2006
    Location
    Ljubljana
    Posts
    687
    Qt products
    Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android
    Thanks
    111
    Thanked 4 Times in 4 Posts

    Default Re: Session question

    Ok, I created a directory, but it is not visible in QtCreator's Project Explorer, is this ok or not?
    Qt 5.3 Opensource & Creator 3.1.2

  10. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Session question

    The .pri file should be visible and under that file the files you declared in the .pri file should be listed.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  11. #9
    Join Date
    May 2008
    Posts
    155
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanked 15 Times in 13 Posts

    Default Re: Session question

    Quote Originally Posted by MarkoSan View Post
    Ok, I created a directory, but it is not visible in QtCreator's Project Explorer, is this ok or not?
    Did you include(your.pri) in the .pro files?

Similar Threads

  1. licensing question
    By tommy in forum Installation and Deployment
    Replies: 4
    Last Post: 14th April 2010, 12:54
  2. Useless but curious compiler warning question
    By Raccoon29 in forum General Programming
    Replies: 4
    Last Post: 30th July 2008, 21:46
  3. Query @ SESSION
    By ashukla in forum General Programming
    Replies: 3
    Last Post: 15th May 2008, 12:19
  4. Access to QSqlTableModel::isDirty Question.
    By patrik08 in forum Qt Programming
    Replies: 3
    Last Post: 12th April 2007, 18:49

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.