-
-
Notifications
You must be signed in to change notification settings - Fork 104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change layout from QGridLayout to QHBoxLayout to add QSplitter #1541
base: master
Are you sure you want to change the base?
Conversation
src/plugins/score-plugin-deviceexplorer/Explorer/Explorer/Widgets/DeviceEditDialog.cpp
Outdated
Show resolved
Hide resolved
src/plugins/score-plugin-deviceexplorer/Explorer/Explorer/Widgets/DeviceEditDialog.cpp
Outdated
Show resolved
Hide resolved
c40ff44
to
ded0550
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good except a small nitpick, I'll test-drive it
@@ -82,5 +83,6 @@ class SCORE_PLUGIN_DEVICEEXPLORER_EXPORT DeviceEditDialog final : public QDialog | |||
|
|||
QString m_originalName{}; | |||
int m_index{}; | |||
QSplitter* splitter; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In C++ when we create some pointer member / pointer variable, it's very important to directly initialize it to nullptr, otherwise it will point to garbage data:
QSplitter* splitter{};
Changing QGridLayout to QVBoxLayout to provide resizable panes
issue with this implementation: when one of the panes isn't populates, such as with audio device, it leaves a gap
QGridLayout
QVBoxLayout