How to show a notification button in title bar (or a general button if not possible)?
up vote
1
down vote
favorite
I would like to add a button to the title bar of my C++/Qt application, like the one for Visual Studio notifications (I've seen other programs using it too, like SourceTree).
I have been searching around for a while but many pages redirect to this or this broken links. I've only found this CodeProject tutorial but my whole project is powered by Qt, not MFC.
Is there any standard way to do it using Qt or in C++?
c++ qt qt5 titlebar custom-titlebar
|
show 1 more comment
up vote
1
down vote
favorite
I would like to add a button to the title bar of my C++/Qt application, like the one for Visual Studio notifications (I've seen other programs using it too, like SourceTree).
I have been searching around for a while but many pages redirect to this or this broken links. I've only found this CodeProject tutorial but my whole project is powered by Qt, not MFC.
Is there any standard way to do it using Qt or in C++?
c++ qt qt5 titlebar custom-titlebar
You can do this by removing the title bar and putting buttons yourself there.
– The Quantum Physicist
Nov 19 at 12:32
@TheQuantumPhysicist, thanks, I've tried that before for other kind of requirements and I've ended up with too much manual overwriting of standard behaviors: window moving/sizing/snapping, global shortcut for minimizing... it is an option but I'd prefer a "less invasive" one ;)
– cbuchart
Nov 19 at 12:35
1
It is not possible with Qt alone. You will have to use native stuff to add it there or use a custom titlebar. There are already projects like this one that handle all the borderless stuff, including snapping etc. You can use those and extend them to add your buttons
– Felix
Nov 19 at 13:10
Or maybe QML does this?
– The Quantum Physicist
Nov 19 at 13:11
@Felix thanks! it seems such project can work, definitely I'll take a look at it
– cbuchart
Nov 19 at 13:47
|
show 1 more comment
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I would like to add a button to the title bar of my C++/Qt application, like the one for Visual Studio notifications (I've seen other programs using it too, like SourceTree).
I have been searching around for a while but many pages redirect to this or this broken links. I've only found this CodeProject tutorial but my whole project is powered by Qt, not MFC.
Is there any standard way to do it using Qt or in C++?
c++ qt qt5 titlebar custom-titlebar
I would like to add a button to the title bar of my C++/Qt application, like the one for Visual Studio notifications (I've seen other programs using it too, like SourceTree).
I have been searching around for a while but many pages redirect to this or this broken links. I've only found this CodeProject tutorial but my whole project is powered by Qt, not MFC.
Is there any standard way to do it using Qt or in C++?
c++ qt qt5 titlebar custom-titlebar
c++ qt qt5 titlebar custom-titlebar
asked Nov 19 at 11:56
cbuchart
5,28952045
5,28952045
You can do this by removing the title bar and putting buttons yourself there.
– The Quantum Physicist
Nov 19 at 12:32
@TheQuantumPhysicist, thanks, I've tried that before for other kind of requirements and I've ended up with too much manual overwriting of standard behaviors: window moving/sizing/snapping, global shortcut for minimizing... it is an option but I'd prefer a "less invasive" one ;)
– cbuchart
Nov 19 at 12:35
1
It is not possible with Qt alone. You will have to use native stuff to add it there or use a custom titlebar. There are already projects like this one that handle all the borderless stuff, including snapping etc. You can use those and extend them to add your buttons
– Felix
Nov 19 at 13:10
Or maybe QML does this?
– The Quantum Physicist
Nov 19 at 13:11
@Felix thanks! it seems such project can work, definitely I'll take a look at it
– cbuchart
Nov 19 at 13:47
|
show 1 more comment
You can do this by removing the title bar and putting buttons yourself there.
– The Quantum Physicist
Nov 19 at 12:32
@TheQuantumPhysicist, thanks, I've tried that before for other kind of requirements and I've ended up with too much manual overwriting of standard behaviors: window moving/sizing/snapping, global shortcut for minimizing... it is an option but I'd prefer a "less invasive" one ;)
– cbuchart
Nov 19 at 12:35
1
It is not possible with Qt alone. You will have to use native stuff to add it there or use a custom titlebar. There are already projects like this one that handle all the borderless stuff, including snapping etc. You can use those and extend them to add your buttons
– Felix
Nov 19 at 13:10
Or maybe QML does this?
– The Quantum Physicist
Nov 19 at 13:11
@Felix thanks! it seems such project can work, definitely I'll take a look at it
– cbuchart
Nov 19 at 13:47
You can do this by removing the title bar and putting buttons yourself there.
– The Quantum Physicist
Nov 19 at 12:32
You can do this by removing the title bar and putting buttons yourself there.
– The Quantum Physicist
Nov 19 at 12:32
@TheQuantumPhysicist, thanks, I've tried that before for other kind of requirements and I've ended up with too much manual overwriting of standard behaviors: window moving/sizing/snapping, global shortcut for minimizing... it is an option but I'd prefer a "less invasive" one ;)
– cbuchart
Nov 19 at 12:35
@TheQuantumPhysicist, thanks, I've tried that before for other kind of requirements and I've ended up with too much manual overwriting of standard behaviors: window moving/sizing/snapping, global shortcut for minimizing... it is an option but I'd prefer a "less invasive" one ;)
– cbuchart
Nov 19 at 12:35
1
1
It is not possible with Qt alone. You will have to use native stuff to add it there or use a custom titlebar. There are already projects like this one that handle all the borderless stuff, including snapping etc. You can use those and extend them to add your buttons
– Felix
Nov 19 at 13:10
It is not possible with Qt alone. You will have to use native stuff to add it there or use a custom titlebar. There are already projects like this one that handle all the borderless stuff, including snapping etc. You can use those and extend them to add your buttons
– Felix
Nov 19 at 13:10
Or maybe QML does this?
– The Quantum Physicist
Nov 19 at 13:11
Or maybe QML does this?
– The Quantum Physicist
Nov 19 at 13:11
@Felix thanks! it seems such project can work, definitely I'll take a look at it
– cbuchart
Nov 19 at 13:47
@Felix thanks! it seems such project can work, definitely I'll take a look at it
– cbuchart
Nov 19 at 13:47
|
show 1 more comment
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374131%2fhow-to-show-a-notification-button-in-title-bar-or-a-general-button-if-not-possi%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can do this by removing the title bar and putting buttons yourself there.
– The Quantum Physicist
Nov 19 at 12:32
@TheQuantumPhysicist, thanks, I've tried that before for other kind of requirements and I've ended up with too much manual overwriting of standard behaviors: window moving/sizing/snapping, global shortcut for minimizing... it is an option but I'd prefer a "less invasive" one ;)
– cbuchart
Nov 19 at 12:35
1
It is not possible with Qt alone. You will have to use native stuff to add it there or use a custom titlebar. There are already projects like this one that handle all the borderless stuff, including snapping etc. You can use those and extend them to add your buttons
– Felix
Nov 19 at 13:10
Or maybe QML does this?
– The Quantum Physicist
Nov 19 at 13:11
@Felix thanks! it seems such project can work, definitely I'll take a look at it
– cbuchart
Nov 19 at 13:47