Results 1 to 3 of 3

Thread: Custom Qt "modules" from within a main QApplication

  1. #1
    Join Date
    Mar 2011
    Posts
    82
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Custom Qt "modules" from within a main QApplication

    I made two games with Qt, a Tetris and a Snake.

    I want to be able to make a QApplication that will read a certain XML file which, in it, will describe which games I have "installed", and the paths to them, and then based on that, will generate buttons for each module (as if it were a Menu).

    The thing is, I don't want to use my two games (tetris and snake) as independent, runnable QApplications. I want to use them as modules for this main application (as if they were addins).

    I want the application to be flexible, that way if tomorrow I make a new game (dunno, Pac-man, for example), I just need to build it as a module for my QApp and then send the extension to whoever it is I want to have it (with the new config.xml, of course).

    Is there any "easy" way to do this?

    How would you proceed about the design of the "modules". I already have a Main QApplication that reads and XML file and generates QPushButtons based on what the XML says, but now I need to be able to connect those buttons to execution commands that will trigger the modules.

    Is this possible/reasonable?

    My main objective is to make an app that if, say, I create a new game, doens't require me to distribute a big binary file, instead I only need to distribute the new module. Same thing for updating old ones, I only need to redistribute the updated module (which will, in turn, be a smaller distribution).

  2. #2
    Join Date
    Sep 2011
    Posts
    1,241
    Thanks
    3
    Thanked 127 Times in 126 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Custom Qt "modules" from within a main QApplication

    If you have a problem, CUT and PASTE your code. Do not retype or simplify it. Give a COMPLETE and COMPILABLE example of your problem. Otherwise we are all guessing the problem from a fabrication where relevant details are often missing.

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

    alitoh (27th July 2012)

  4. #3
    Join Date
    Mar 2011
    Posts
    82
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Custom Qt "modules" from within a main QApplication

    I *think* this is totally it. The Low Level API, to be precise.

    I still need to see how to make it suit my particular needs, but I think I am in the right track now.

    Thanks!

Similar Threads

  1. Replies: 3
    Last Post: 26th August 2011, 13:44
  2. Replies: 4
    Last Post: 8th April 2011, 06:47
  3. Replies: 1
    Last Post: 10th March 2011, 14:40
  4. Replies: 1
    Last Post: 8th January 2009, 13:36
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05

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.