Results 1 to 10 of 10

Thread: Custom TabWidget button

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    Join Date
    Jul 2012
    Posts
    123
    Thanks
    4
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Custom TabWidget button

    thanks and how i can add toolbar to QWidget i try some thinks but they don't work


    Added after 5 minutes:


    Quote Originally Posted by d_stranz View Post
    I would start by creating a custom QWidget (derived from QTabBar) that contains both a QTabBar and a QToolBar widget in a layout. Then, derive a custom QTabWidget class that replaces its native QTabBar with an instance of your custom tab bar class (see QTabWidget::setTabBar()). This is a protected function, so you are forced to derive a new QTabWidget class. You would probably need to do that anyway, because you will be changing the tool bar contents depending on what is being displayed in a specific tab.
    this isn't quite what i want because still stay window's frames. What you wrote is good but it will not look good i want tabbar in frame

    I know how make QToolBar but i don't know how i can dock it to Top when i create toolbar in Widget
    Qt Code:
    1. QToolbar *bar= new QToolbar("toolbar",this);
    To copy to clipboard, switch view to plain text mode 
    it make toolbar but the toolbar size is about 2x2 but i want toolba like toolbar in QMainWindow
    Last edited by Viper666; 1st August 2012 at 17:34.

Similar Threads

  1. Custom button
    By Erik-Moscow in forum Qt Programming
    Replies: 4
    Last Post: 1st February 2010, 16:58
  2. Custom Button
    By wirasto in forum Newbie
    Replies: 1
    Last Post: 14th November 2009, 10:59
  3. Custom widget: a button within a button
    By Gnurou in forum Qt Programming
    Replies: 7
    Last Post: 18th June 2009, 09:03
  4. close button for tabwidget
    By sepehr in forum Qt Programming
    Replies: 1
    Last Post: 2nd March 2009, 13:57
  5. How to create a custom Button?
    By Mister_Crac in forum Qt Programming
    Replies: 18
    Last Post: 22nd October 2006, 23:59

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
  •  
Qt is a trademark of The Qt Company.