Results 1 to 3 of 3

Thread: Display drawer

  1. #1
    Join Date
    Sep 2014
    Posts
    94
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Upmove

    Qt Code:
    1. import QtQuick 2.7
    2. import QtQuick.Controls 2.0
    3. import QtQuick.Layouts 1.0
    4. import QtQuick 2.6
    5. import QtQuick.Layouts 1.3
    6. import QtQuick.Controls 2.0
    7. import QtQuick.Controls.Material 2.0
    8. import QtQuick.Controls.Universal 2.0
    9. import Qt.labs.settings 1.0
    10. import QtQuick.Dialogs 1.1
    11.  
    12. ApplicationWindow {
    13. id: window
    14. visible: true
    15.  
    16.  
    17. Drawer {
    18. id:drawer
    19.  
    20. width: window.width * 0.6
    21. height: window.height - header.height
    22.  
    23.  
    24. }
    25. header: ToolBar
    26. {
    27. ToolButton
    28. {
    29. text:"Home"
    30. onClicked:
    31.  
    32. drawer.open()
    33. }
    34. }
    35.  
    36. }
    To copy to clipboard, switch view to plain text mode 

    Drawer is remove toolbar height on upside but it is removing down can anybody help to move down
    Last edited by anda_skoa; 25th October 2016 at 16:41. Reason: missing [code] tags

  2. #2
    Join Date
    Sep 2014
    Posts
    94
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Display drawer

    how to display drawer belowtool bar in qml can any give solution....

  3. #3
    Join Date
    Sep 2014
    Posts
    94
    Qt products
    Qt4 Qt5
    Platforms
    Windows

    Default Drawer

    Qt Code:
    1. import QtQuick 2.7
    2. import QtQuick.Controls 2.0
    3. import QtQuick.Layouts 1.0
    4. import QtQuick 2.6
    5. import QtQuick.Layouts 1.3
    6. import QtQuick.Controls 2.0
    7. import QtQuick.Controls.Material 2.0
    8. import QtQuick.Controls.Universal 2.0
    9. import Qt.labs.settings 1.0
    10. import QtQuick.Dialogs 1.1
    11. import QtQuick.Controls.Styles 1.4
    12.  
    13. ApplicationWindow {
    14. id: window
    15. visible: true
    16. width:480
    17. height:480
    18.  
    19.  
    20. header: ToolBar
    21. {
    22.  
    23. ToolButton
    24. {
    25. text:"Home"
    26. onClicked:
    27. drawer.open()
    28. }
    29. }
    30.  
    31. Drawer
    32. {
    33. id:drawer
    34.  
    35. y: header.height
    36. width: 150
    37. height: window.height - header.height
    38.  
    39. }
    40.  
    41. StackView {
    42. id: stackView
    43. anchors.fill: parent
    44.  
    45. initialItem: Pane {
    46. id: pane
    47.  
    48. Image
    49. {
    50. id:background
    51. anchors.fill: parent
    52. // fillMode: Image.Pad
    53. // source:"qrc:/images/home.png"
    54. }
    55. ToolButton
    56. {
    57. text:"Test"
    58. anchors.fill: parent
    59. anchors.verticalCenter: parent.verticalCenter
    60. anchors.horizontalCenter: parent.horizontalCenter
    61.  
    62. }
    63. }
    64. }
    65.  
    66. }
    To copy to clipboard, switch view to plain text mode 

    i want to display drawer below toolbar in qml
    Last edited by anda_skoa; 27th October 2016 at 18:26. Reason: missing [code] tags

Similar Threads

  1. Change Start position of Drawer in RightArea of QMainWindow
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 2nd August 2014, 21:27
  2. Same Width of Qt's Bottom Drawer and its parent QMainWindow
    By santosh.kumar in forum Qt Programming
    Replies: 1
    Last Post: 1st August 2014, 23:41
  3. Using QWidget as Drawer within QWorkspace
    By abenstex in forum Qt Programming
    Replies: 0
    Last Post: 2nd August 2008, 14:14
  4. how to show Dialog as drawer on the bottom of the parent screen?
    By vishal.chauhan in forum Qt Programming
    Replies: 1
    Last Post: 7th March 2008, 08:00
  5. Drawer Goofiness
    By Brandybuck in forum Qt Programming
    Replies: 4
    Last Post: 4th January 2007, 23:40

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.