hmm.. I have one problem.
My app has one QMainWindow, and several other QWidget that can be show on QMainWindow(one at the time, and it is not QTabWidget!!).
There are several situations:
{
}
//In this situation, on my QMainWindow are showing several widget at the time
{
}
//In this situation, widget show as a dialog, on other window (not in QMainWindow)
{
Widget() {};
}
//In this situation all works fine, only this widget are showing on QMainWindow at the time. But it brings memory leaks,
// because this widget has no parent, and i need to delete it by it self..
//In my QMainWindow I do this:
setCurrentWidget(widget)
class Widget : public QWidget
{
Widget(QWidget *parent) : QWidget(parent) {};
}
//In this situation, on my QMainWindow are showing several widget at the time
class Widget : public QDialog
{
Widget(QWidget *parent) : QDialog(parent) {};
}
//In this situation, widget show as a dialog, on other window (not in QMainWindow)
class Widget : public QWidget
{
Widget() {};
}
//In this situation all works fine, only this widget are showing on QMainWindow at the time. But it brings memory leaks,
// because this widget has no parent, and i need to delete it by it self..
//In my QMainWindow I do this:
setCurrentWidget(widget)
To copy to clipboard, switch view to plain text mode
Bookmarks