Results 1 to 9 of 9

Thread: QtoolBar like movable feature for a widget inside Central Widget

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2011
    Location
    Finland
    Posts
    164
    Thanks
    1
    Thanked 26 Times in 26 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: QtoolBar like movable feature for a widget inside Central Widget

    Since I can't guess the purpose of what you are doing, the only thing that comes to my mind is:

    1. void setFloatable ( bool floatable ) for the toolbar of your MainWindow
    2. or use QMdiArea if that helps anything

  2. #2
    Join Date
    Mar 2009
    Location
    delhi India
    Posts
    56
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QtoolBar like movable feature for a widget inside Central Widget

    My central widget is already set as MDIArea. As shown in the image i want to have toobars within the central widget apart from the Qtoolbars of QMainwindow which are anyways set to floatable.

  3. #3
    Join Date
    Jun 2011
    Location
    Finland
    Posts
    164
    Thanks
    1
    Thanked 26 Times in 26 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: QtoolBar like movable feature for a widget inside Central Widget

    So just create a QToolBar and add to your MDIArea.

  4. #4
    Join Date
    Mar 2009
    Location
    delhi India
    Posts
    56
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QtoolBar like movable feature for a widget inside Central Widget

    Well there isn't any method to add the toobar to MDIArea like addToolbar() function of QMainwindow.......

  5. #5
    Join Date
    Jun 2011
    Location
    Finland
    Posts
    164
    Thanks
    1
    Thanked 26 Times in 26 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: QtoolBar like movable feature for a widget inside Central Widget

    There is addWidget though...

  6. #6
    Join Date
    Mar 2009
    Location
    delhi India
    Posts
    56
    Thanks
    1
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QtoolBar like movable feature for a widget inside Central Widget

    i couldn't find the method addwidget so i used addsubwindow .That doesn't solve the purpose As it doesn't give the feel like its toolbar around the QMDIarea rather looks like window within MDIarea.

  7. #7
    Join Date
    Jun 2011
    Location
    Finland
    Posts
    164
    Thanks
    1
    Thanked 26 Times in 26 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default Re: QtoolBar like movable feature for a widget inside Central Widget

    Have you tried setting different WindowFlags?

    Anyway if you are already satisfied by using QMainWindow inside your QMdiArea, then it is a perfectly fine solution from my perspective.

Similar Threads

  1. QToolBar in Win Mobile is not movable?
    By feverzsj in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 26th May 2011, 08:47
  2. Qt Designer About central widget in Qt Designer
    By lrjdragon in forum Qt Tools
    Replies: 2
    Last Post: 3rd April 2010, 16:11
  3. QDockWidgets without central widget
    By JoeMerchant in forum Qt Programming
    Replies: 17
    Last Post: 8th August 2007, 14:52
  4. user resizable and movable QLabel widget
    By hvengel in forum Qt Programming
    Replies: 8
    Last Post: 12th April 2007, 00:01
  5. Central Widget of QMainWindow
    By sumsin in forum Qt Programming
    Replies: 3
    Last Post: 13th March 2006, 18:32

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.