roseicollis
23rd December 2014, 11:14
Hi,
I'm amking a Qt Gui application so the main its like:
int main(int argc, char *argv[])
{
QApplication a(argc, argv); //Maybe I can do something with this line?
}
I need to use those arguments (argc, argv[]) in the mainwindow. So my question is: How can I use them there? The only solution I can think of is to create a new class which receives them, put them in global variables and then inherite mainwindow from the new class but I don't really like it and I suposse there is an easer way to do it.
Thanks!
I'm amking a Qt Gui application so the main its like:
int main(int argc, char *argv[])
{
QApplication a(argc, argv); //Maybe I can do something with this line?
}
I need to use those arguments (argc, argv[]) in the mainwindow. So my question is: How can I use them there? The only solution I can think of is to create a new class which receives them, put them in global variables and then inherite mainwindow from the new class but I don't really like it and I suposse there is an easer way to do it.
Thanks!