Results 1 to 8 of 8

Thread: Custom widget: a button within a button

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    24
    Thanks
    2
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Custom widget: a button within a button

    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:



    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:



    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.
    Attached Images Attached Images

Similar Threads

  1. How to use custom widget editor with QItemDelegate
    By wysman in forum Qt Programming
    Replies: 2
    Last Post: 20th May 2009, 18:20
  2. Playbutton functionality
    By uchennaanyanwu in forum Qt Programming
    Replies: 5
    Last Post: 31st July 2008, 22:29
  3. Custom Widget - First Steps
    By sekatsim in forum Qt Programming
    Replies: 8
    Last Post: 26th June 2008, 17:19
  4. Custom widget
    By zorro68 in forum Qt Programming
    Replies: 7
    Last Post: 28th January 2008, 14:06
  5. custom plug-in widget in another custom plug-in widget.
    By MrGarbage in forum Qt Programming
    Replies: 6
    Last Post: 27th August 2007, 15:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.