How to launch a table with columns' names set as checkboxes' labels
-
What is most common is this:
@
WizardLoadMapFile LoadMapWizard(this);LoadMapWizard.setFileName(FileName_str); if (LoadMapWizard.exec() == QDialog::Accepted) { this->m_NewFileName = LoadMapWizard.m_MapFileName; emit signal(m_NewFileName); // Just an example }
@
Where the WizardLoadMapFile is the QWizard inherited class that contains member variables holding the needed information that the mainWindow needs to construct the table (or something else) -
What about just launching the mainwindow with a textedit central widget just after the wizard button finish is clicked in the conclusion page. My mainwindow is set to launch a textedit for now for experimental purposes which is currently disabled, but i want to launch it once the conclusion page winds up??
-
Hello anyone??
-
[quote author="pkjag" date="1380273224"]Hello anyone??[/quote]
Practice some patiece please.
-
Hey Andre can you help me with this problem??
I've been going through it a lot and i'm kinda stuck!! -
To me, it is no so clear anymore what your actual problem is at the moment. SGaist gave you some valuable suggestions already. What did you do with those?
However, I doubt a stringlist is the best data structure for this purpose. What would be in the strings exactly? I guess you don't have an endless variety of columns you can display and populate. One the one hand it is inefficient to use strings to contain static names for columns, and on the other is is not a good idea to use translatable strings for application logic. So, if your set of possible columns is indeed limited, I'd simply make an enum for them and use a QFlags (or as QVector<ColumnEnum> if ordering is important) to communicate the columns to display.
-
That's sorted out. My problem now is launching the table in the mainwindow's central widget(it's currently set to disabled) immediately the finish button is clicked in the conclusion page of the wizard. The code above shows my attempt, but it apparently doesn't work!!
-
is anybody gonna answer this?
-
It doesn't and it's not the best design either.
Did you try the suggestion of Jeroentj@home ?
-
That's for collecting the checkboxes information about being clicked, what about for launching the actual table for experimental purposes say without the columns in the mainwindow, that's the main problem!
-
The technique is still valid. Once the wizard is ended do the stuff you want with your central widget even if you don't use the information from your wizard.
-
Then what's wrong with the implementation where i connect the mainwindow and the wizard with the LaunchWizard function, if it doesn't work??
-
Connect your wizard to your MainWindow inside your MainWindow, not your wizard.