Hi
Here is the constructor for main widget:
GMessenger
::GMessenger() : QWidget(0, Qt
::WindowStaysOnTopHint | Qt
::FramelessWindowHint){ setLayout(m_pLayout);
}
GMessenger::GMessenger() : QWidget(0, Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint){
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
m_pLayout = new QVBoxLayout();
setLayout(m_pLayout);
}
To copy to clipboard, switch view to plain text mode
Here is the constructor for child widget:
GMessenger
::ProgressJobNotifier::ProgressJobNotifier(const QString &title
) : QFrame(0){
...
setLayout(m_pVLayout);
}
GMessenger::ProgressJobNotifier::ProgressJobNotifier(const QString &title) : QFrame(0){
setFrameStyle(QFrame::StyledPanel | QFrame::Raised);
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Maximum);
...
setLayout(m_pVLayout);
}
To copy to clipboard, switch view to plain text mode
QFrame derived child widget increases/decreases its size when a child widget is added to it, while QWidget derived top level widget increases its size when a child widget is added but not decreases its size when a child widget is removed (Which is what i want). So help please!
Bookmarks