jcodrin
26th May 2013, 15:06
I have an "mainwindow" containing a "add_dir" button to create a new folder. When I push the button, it opens a new "dialog" window . "Dialog" window contains a "qtextedit" and "accept" button and a "cancel" button. I want to use text from "qtextedit" to create a directory with that name.
Mainwindow and Dialog are two different classes.
In Mainwindow class i have an Dialog object . "accept" button slot from "Dialog" class increment an private QString variable . I have a public method in "Dialog" class to return private variable but in that method private variable is empty. If i display private variable in slot it have the value with text tapped in "qtextedit" .
How can i rezolve that problem ?
Or you can give me another way to solve my problem?
Mainwindow and Dialog are two different classes.
In Mainwindow class i have an Dialog object . "accept" button slot from "Dialog" class increment an private QString variable . I have a public method in "Dialog" class to return private variable but in that method private variable is empty. If i display private variable in slot it have the value with text tapped in "qtextedit" .
How can i rezolve that problem ?
Or you can give me another way to solve my problem?