Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Drag&Drop;] QTabWidget
Forum Updated to NodeBB v4.3 + New Features

[Drag&Drop;] QTabWidget

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 2.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Baca48
    wrote on last edited by
    #1

    I've reimplemented QTabBar and QTabWidget in order to make tabs moveable between different TabWidgets in my application (tab is moved, NOT copied). If somebody is using Firefox it's possible to do such thing with tabs between two firefox's windows.

    My idea how to do that: let's say that the widget inside each tab is called ExampleWidget (there's only one such widget per tab). It is to work only inside one app that's why I'm thinking about passing a pointer to source TabWidget and a pointer to ExampleWidget via MIME. Then I'm going to use this information in DropEvent in order to move the tab (delete tab from source TabWidget, create a new tab in TabWidget which receives DropEvent and add ExampleWidget using second pointer from MIME). I hope my description is understandable. My question is: is it a proper way to do it or somebody has better idea?

    Talking about drag&drop; I have one more question. How can I get to know if the user drops something outside the window? In Firefox you can open new window when you drop tab outside it.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      Hi,

      for the first question, it is doable thatw ay, yes. If it is the nicest version is another question, but as you only want to use it inside your process, I would say it is ok.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • B Offline
        B Offline
        Baca48
        wrote on last edited by
        #3

        Thx for the answer. I think I'm going to this that way because I haven't found anything better yet.

        Could anybody say something about my last question?

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved