Results 1 to 2 of 2

Thread: QTabWidget drag and drop

  1. #1
    Join Date
    Mar 2008
    Houston, Texas, USA
    Thanked 17 Times in 17 Posts
    Qt products
    MacOS X Unix/X11 Windows Maemo/MeeGo

    Default QTabWidget drag and drop

    I was wondering how much of this would be possible. I have an network application that needs drag and drop with tabs. Each tab holds a reference to a QSslSocket for communicating. I have a tab widget inside of another tab widget.
    | TabWidget1............|
    | _______________ .|
    | | TabWidget2....... |.|
    | --------------------..|

    I want to be able to pull a tab from TabWidget2 and drop it inside of TabWidget1 above or below TabWidget2. But not attach it to TabWidget1's tabs. But create another QTabWidget inside of TabWidget1 so there would be TabWidget3 above TabWidget2 or below.

    I need to also be able to keep the existing Socket and all the slots connecting to it.
    Qt-4.7.3 | Gentoo ~amd64 | KDE-4.7
    Aki IRC Client for KDE4 | Qt Documentation

  2. #2
    Join Date
    Jan 2006
    Warsaw, Poland
    Thanked 5,013 Times in 4,791 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits

    Default Re: QTabWidget drag and drop

    Each tab in a tab widget is a widget. If you implement a drop mechanism on your tab widget that creates a new child tab widget and adds an arbitrary tab to it, you can then move an existing tab from one tabwidget to another.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.

Similar Threads

  1. drag and drop QToolButton in QToolBar
    By NBilal in forum Qt Programming
    Replies: 1
    Last Post: 28th December 2008, 21:11
  2. Drag and Drop a widget in and out QTabWidget
    By smarinr in forum Qt Programming
    Replies: 1
    Last Post: 11th December 2008, 20:10
  3. Change cursor & status during Drag & Drop
    By ronlongo in forum Qt Programming
    Replies: 0
    Last Post: 1st December 2008, 17:56
  4. Drag & Drop when parent and childs accept drops?
    By gri in forum Qt Programming
    Replies: 0
    Last Post: 17th October 2008, 10:00
  5. Drag and drop revisited
    By Big Duck in forum Newbie
    Replies: 2
    Last Post: 30th June 2006, 17:41

Tags for this Thread


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.