Gnurou
18th June 2009, 06:23
Hello everybody,
I know, this may sound weird by the title. I'm working on an application that includes a panel which acts like a tab bar, excepted that is also has the option of showing no widget at all to save space. Users of KDE or Qt Creator probably understand what I am talking about, others can look at the following screenshot:
http://www.qtcentre.org/forum/attachment.php?attachmentid=3339&stc=1&d=1245302037
I've implemented this bar using a horizontal layout and some QToolButtons, and it works great. But now I need to insert a button within the tool button that would emit a custom signal when clicked. Here is a mockup:
http://www.qtcentre.org/forum/attachment.php?attachmentid=3340&stc=1&d=1245302077
I looked at various sources, including the code for QPushButton, and I see no easy way to implement that. Moreover this is the first time I would do such a thing. I don't need complete layouting, just to display a button after the text that would receive mouse events. Would anybody have a couple of hints to guide me through this?
Thanks in advance,
Alex.
I know, this may sound weird by the title. I'm working on an application that includes a panel which acts like a tab bar, excepted that is also has the option of showing no widget at all to save space. Users of KDE or Qt Creator probably understand what I am talking about, others can look at the following screenshot:
http://www.qtcentre.org/forum/attachment.php?attachmentid=3339&stc=1&d=1245302037
I've implemented this bar using a horizontal layout and some QToolButtons, and it works great. But now I need to insert a button within the tool button that would emit a custom signal when clicked. Here is a mockup:
http://www.qtcentre.org/forum/attachment.php?attachmentid=3340&stc=1&d=1245302077
I looked at various sources, including the code for QPushButton, and I see no easy way to implement that. Moreover this is the first time I would do such a thing. I don't need complete layouting, just to display a button after the text that would receive mouse events. Would anybody have a couple of hints to guide me through this?
Thanks in advance,
Alex.