Since a QSpacerItem does not inherit QWidget, I can't use addWidget(). So how do I add a spacer to a toolbar?
Since a QSpacerItem does not inherit QWidget, I can't use addWidget(). So how do I add a spacer to a toolbar?
All addSeperator() did was add this little vertical line. I was hoping to add more space and have the ability to customize the scaling and such.
Add an empty QLabel. The only downside of this I found so far is that you wont be able to move the window around on macos when clicking on that empty space made by the label.
It's nice to be important but it's more important to be nice.
Add a QWidget instead of a QSpacerItem, set the size policy on the spacer and add the widget to the toolbar.
Qt Code:
// toolBar is a pointer to an existing toolbar toolBar->addWidget(spacer);To copy to clipboard, switch view to plain text mode
Bookmarks