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. All problems I need help about QTreeWidget and QToolBar
Servers for Qt installer are currently down

All problems I need help about QTreeWidget and QToolBar

Scheduled Pinned Locked Moved Unsolved General and Desktop
qtreewidgetqtoolbar
7 Posts 3 Posters 2.5k 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.
  • N Offline
    N Offline
    nashge
    wrote on 12 Apr 2016, 03:32 last edited by
    #1

    Hi,every guys.I have some problems about my software development.I tried many method,but failed,so disappointed.

    *QToolBar's will hide actions i added in it when i adjust mainwindow width. Just like QT doc sayes:
    "When a toolbar is resized in such a way that it is too small to show all the items it contains, an extension button will appear as the last item in the toolbar. Pressing the extension button will pop up a menu containing the items that does not currently fit in the toolbar."

    Now, i don't want to this feature. I want to show all actions,widget added in it,if i adjust window size,width is too slow,just show part of them,such like just part length of lineedit.
    I tried set ToolBar fixed width,but after it i just can't adjust window size,this is annoyed.

    *Problems about QTreeWidget
    I drag a item to another widget,but when my drag process still in the QTreeWidget. It's show a forbidden symbol. How to hide this forbidden symbol?

    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 12 Apr 2016, 04:17 last edited by
      #2

      Hi!

      Drag&Drop: did you read the documentation: http://doc.qt.io/qt-5.6/dnd.html ?
      You have to accept the drop like:

      Window::Window(QWidget *parent)
          : QWidget(parent)
      {
          ...
          setAcceptDrops(true);
      }
      
      void Window::dragEnterEvent(QDragEnterEvent *event)
      {
          if (event->mimeData()->hasFormat("text/plain"))
              event->acceptProposedAction();
      }
      

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      N 1 Reply Last reply 12 Apr 2016, 04:39
      1
      • J jsulm
        12 Apr 2016, 04:17

        Hi!

        Drag&Drop: did you read the documentation: http://doc.qt.io/qt-5.6/dnd.html ?
        You have to accept the drop like:

        Window::Window(QWidget *parent)
            : QWidget(parent)
        {
            ...
            setAcceptDrops(true);
        }
        
        void Window::dragEnterEvent(QDragEnterEvent *event)
        {
            if (event->mimeData()->hasFormat("text/plain"))
                event->acceptProposedAction();
        }
        
        N Offline
        N Offline
        nashge
        wrote on 12 Apr 2016, 04:39 last edited by
        #3

        @jsulm
        Thank you!
        I did solve second problem through read the documentation.
        About first problem,do you have any suggestion?

        1 Reply Last reply
        0
        • J Offline
          J Offline
          jsulm
          Lifetime Qt Champion
          wrote on 12 Apr 2016, 04:40 last edited by
          #4

          Sorry, I don't know.

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 12 Apr 2016, 23:37 last edited by
            #5

            Hi and welcome to devnet,

            You'll have to implement your own QToolBar for that. Note that you are likely going against the platform human interface guidelines doing so.

            Out of curiosity, why do you want to do that ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            N 1 Reply Last reply 14 Apr 2016, 02:01
            0
            • S SGaist
              12 Apr 2016, 23:37

              Hi and welcome to devnet,

              You'll have to implement your own QToolBar for that. Note that you are likely going against the platform human interface guidelines doing so.

              Out of curiosity, why do you want to do that ?

              N Offline
              N Offline
              nashge
              wrote on 14 Apr 2016, 02:01 last edited by
              #6

              @SGaist
              Thx for you reply.Maybe I need implement my own QToolBar to achieve this goal.
              This project we are developing by imitate another commercial software,we found it's toolbar has this feature. So I found all QToolBar doc and failure.

              By the way,do you know another strange featue,make the vertical scrollbar in the left of the QListWidget, otherwise in the right of QListWidget default ,I found it's also a difficult task for me.

              Another problem is How do you think use QML in the PC software development through QQuickWidget? Because i found document says QML is mainly used for mobile applications where touch input, fluid animations (60 FPS) and user experience are crucial.

              Forgive my poor english,Thank you again for your patience!

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 14 Apr 2016, 10:24 last edited by
                #7

                Depending on your needs you might be interested by DevMachines's QTitanRibbon which seems to be doing what you want. Note that it's a commercial product.

                What exactly are you trying to achieve with putting the scroll bar to the left ?

                There are already several applications written in QML for desktop. It really depends on what you want to do.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0

                1/7

                12 Apr 2016, 03:32

                • Login

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