Re: [Interest] qtquickcontrols question

2013-11-07 Thread Rutledge Shawn

On 7 Nov 2013, at 7:53 AM, Damian Ivanov wrote:

 Thanks Shawn for the clarification.
 
 That's rather old, about an earlier iteration of the component set that we 
 are shipping with Qt 5.x (x = 1).  Menu is now multi-purpose and therefore 
 has replaced ContextMenu.
 ok. how can I show the menu then :) ?

popup() instead of show() seems to work.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qtquickcontrols question

2013-11-07 Thread Damian Ivanov
Great! Super Thanks Shawn. Two last questions for today I promise :)
Is it possible that I have them persistent i the main window like
___
|Menu1 |Menu2|
|  Item1|Item1  |
|2 |   2
  |
|3 |   3
  |
|4 |   4
  |
|   |
|
|   |
|
|   |
|
|   |
|
|   |
|

And is Menu and MenuItem stylable?  I can see a style property but I
can not find any documentation on it. I want also to define the
background of the menu.

2013/11/7 Rutledge Shawn shawn.rutle...@digia.com:

 On 7 Nov 2013, at 7:53 AM, Damian Ivanov wrote:

 Thanks Shawn for the clarification.

 That's rather old, about an earlier iteration of the component set that we 
 are shipping with Qt 5.x (x = 1).  Menu is now multi-purpose and 
 therefore has replaced ContextMenu.
 ok. how can I show the menu then :) ?

 popup() instead of show() seems to work.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qtquickcontrols question

2013-11-07 Thread deDietrich Gabriel
On Nov 7, 2013, at 10:31 AM, Damian Ivanov damianator...@gmail.com wrote:

 Great! Super Thanks Shawn. Two last questions for today I promise :)
 Is it possible that I have them persistent i the main window like

No, we don’t currently support sticky menus in any way. What’s your use case? I 
don’t quite understand your diagram.

 […]
 
 And is Menu and MenuItem stylable?  I can see a style property but I
 can not find any documentation on it. I want also to define the
 background of the menu.


This is work in progress, although styling will probably be very minimal for 
5.2.

Best regards,

Dr. Gabriel de Dietrich
Senior Software Developer
qt.digia.com
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qtquickcontrols question

2013-11-07 Thread Rutledge Shawn

On 7 Nov 2013, at 10:31 AM, Damian Ivanov wrote:

 Great! Super Thanks Shawn. Two last questions for today I promise :)
 Is it possible that I have them persistent i the main window like
 ___
 |Menu1 |Menu2|

You can read the docs about menu bars.

 And is Menu and MenuItem stylable?  I can see a style property but I
 can not find any documentation on it. I want also to define the
 background of the menu.

No, because we try to use native platform menus when possible.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qtquickcontrols question

2013-11-07 Thread Damian Ivanov
My idea was that have them expanded on the main window. e.g like on a
windows starmenu:
left side   right side3
Favorites LIST Control Panel - Menu
with subitems
Recently used LIST  Recent documents menu
All Program - Menu etc

2013/11/7 Rutledge Shawn shawn.rutle...@digia.com:

 On 7 Nov 2013, at 10:31 AM, Damian Ivanov wrote:

 Great! Super Thanks Shawn. Two last questions for today I promise :)
 Is it possible that I have them persistent i the main window like
 ___
 |Menu1 |Menu2|

 You can read the docs about menu bars.

 And is Menu and MenuItem stylable?  I can see a style property but I
 can not find any documentation on it. I want also to define the
 background of the menu.

 No, because we try to use native platform menus when possible.

___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


[Interest] qtquickcontrols question

2013-11-06 Thread Damian Ivanov
Hi,

I have a question :)
http://blog.qt.digia.com/blog/2011/08/26/toplevel-windows-and-menus-with-qt-quick/

says
 Context Menus

Sometimes it is also nice to have a ContextMenu for certain options.
In that case some javascript certainly needs to be involved.

ContextMenu {
id: contextMenu
MenuItem {
text: Copy
shortcut: Ctrl+C
onTriggered: copy()
}
MenuItem {
text: Paste
shortcut: Ctrl+V
onTriggered: paste()
}
}
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.RightButton
onPressed: contextMenu.showPopup(mouseX,mouseY)
}


I'm trying to use a ContextMenu inside a Window { } but it is an
unknown type? why? How can I use Menu { } Items inside a Window { } .
I would also use ApplicationWindow but I need quite every option
Window { } provides (modality, window flags and stuff)




import QtQuick 2.1

import QtQuick.Controls 1.0

import QtProcess 0.1

import QtQuick.Window 2.0

Window {

id: window1


width: 400

height: 400

minimumWidth: 400

minimumHeight: 400

title: child window

ContextMenu {

id: contextMenu

MenuItem {

text: Copy

shortcut: Ctrl+C

onTriggered: copy()

}

MenuItem {

text: Paste

shortcut: Ctrl+V

onTriggered: paste()

}

MouseArea {

anchors.fill: parent

acceptedButtons: Qt.RightButton

onPressed: contextMenu.showPopup(mouseX,mouseY)

}

}

}



 main.qml:13 ContextMenu is not a type


QQmlComponent: Component is not ready

Error: Your root item has to be a Window.

The program has unexpectedly finished.



Thanks in advance
Damian
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qtquickcontrols question

2013-11-06 Thread Rutledge Shawn

On 6 Nov 2013, at 4:49 PM, Damian Ivanov wrote:

 Hi,
 
 I have a question :)
 http://blog.qt.digia.com/blog/2011/08/26/toplevel-windows-and-menus-with-qt-quick/

That's rather old, about an earlier iteration of the component set that we are 
shipping with Qt 5.x (x = 1).  Menu is now multi-purpose and therefore has 
replaced ContextMenu.

http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-menu.html

 I'm trying to use a ContextMenu inside a Window { } but it is an
 unknown type? why? How can I use Menu { } Items inside a Window { } .
 I would also use ApplicationWindow but I need quite every option
 Window { } provides (modality, window flags and stuff)

ApplicationWindow is actually a Window with some extra stuff (menubar, toolbar 
etc.) so all the same properties are still available.

http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-applicationwindow.html
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


Re: [Interest] qtquickcontrols question

2013-11-06 Thread Damian Ivanov
Thanks Shawn for the clarification.

That's rather old, about an earlier iteration of the component set that we are 
shipping with Qt 5.x (x = 1).  Menu is now multi-purpose and therefore has 
replaced ContextMenu.
ok. how can I show the menu then :) ?

Window {

id: window1


width: 400

height: 400

minimumWidth: 400

minimumHeight: 400

title: child window

MouseArea {

anchors.fill: parent

acceptedButtons: Qt.RightButton

onPressed: contextMenu.show()

}

Menu {

id: contextMenu

enabled: true

title: blabla

MenuItem {

text: Copy

shortcut: Ctrl+C

onTriggered: copy()

}

MenuItem {

text: Paste

shortcut: Ctrl+V

onTriggered: paste()

}


   }

}



2013/11/7 Rutledge Shawn shawn.rutle...@digia.com:

 On 6 Nov 2013, at 4:49 PM, Damian Ivanov wrote:

 Hi,

 I have a question :)
 http://blog.qt.digia.com/blog/2011/08/26/toplevel-windows-and-menus-with-qt-quick/

 That's rather old, about an earlier iteration of the component set that we 
 are shipping with Qt 5.x (x = 1).  Menu is now multi-purpose and therefore 
 has replaced ContextMenu.

 http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-menu.html

 I'm trying to use a ContextMenu inside a Window { } but it is an
 unknown type? why? How can I use Menu { } Items inside a Window { } .
 I would also use ApplicationWindow but I need quite every option
 Window { } provides (modality, window flags and stuff)

 ApplicationWindow is actually a Window with some extra stuff (menubar, 
 toolbar etc.) so all the same properties are still available.

 http://qt-project.org/doc/qt-5.1/qtquickcontrols/qml-qtquick-controls1-applicationwindow.html
___
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest