|
|
07-03-2012
, 02:15 PM
|
|
Posts: 1,765 |
Thanked: 1,878 times |
Joined on May 2011
@ Poland
|
#12
|
It does not require x/y co-ordinates, but of course it has basically no width/height if you don't specify them. It can be a problem if its descendants use indirectly the Item's width/height to calculate their size.
|
|
07-03-2012
, 02:36 PM
|
|
Posts: 952 |
Thanked: 1,772 times |
Joined on Jun 2011
@ Finland
|
#13
|
Is there any way I can tell the Rectangle to occupy the maximum size (as it's with Column only), so that in landscape N900 it'll be 800x480, portrait N900 480x800, portrait N9 480x854 and so on?
| The Following User Says Thank You to ajalkane For This Useful Post: | ||
|
|
07-03-2012
, 03:23 PM
|
|
Posts: 1,765 |
Thanked: 1,878 times |
Joined on May 2011
@ Poland
|
#14
|
I don't know about N900, but for N9 see the QML Window component's sources on how to do it. Here's its documentation:
http://harmattan-dev.nokia.com/docs/...go-window.html
import QtQuick 1.0
import org.maemo.fremantle 1.0
//property color fontcolor: "white"
PageStackWindow
{
property color fontcolor: "white"
initialPage: Component
{
Column
{
Row
{
width: parent.width
CheckBox
{
id: tracksrc
//text: "Select track from library"
checked: true
//checkable: true
}
Label
{
id: tracksrcText
text: "Select track from library"
anchors.verticalCenter: tracksrc.verticalCenter
color: fontcolor
}
}
Label
{
id: selecttracklabel
text: "Selected track"
color: fontcolor
}
Button
{
id: selecttrack
text: "No track selected"
checkable: false
width: parent.width
onClicked:
{
}
}
SelectionDialog
{
id: lyricssrcdialog
titleText: "Download source"
selectedIndex: 0
model: ListModel
{
ListElement { name: "AZLyrics" }
}
}
Button
{
id: lyricssrcbutton
text: lyricssrcdialog.model.get(lyricssrcdialog.selectedIndex).name
width: parent.width
onClicked: { lyricssrcdialog.open(); }
}
Button
{
id: go
text: "Go!"
width: parent.width
}
}
}
}
|
|
07-03-2012
, 04:32 PM
|
|
Posts: 952 |
Thanked: 1,772 times |
Joined on Jun 2011
@ Finland
|
#15
|
I think it's what I'm looking for, as I plan to release my programs not only for N900 but for N9 too.
But somehow the hildon status menu is still shown. changing showExpanded() to showMaximized() doesn't work.
PageStackWindow
{
showStatusBar: false
...
}
| The Following User Says Thank You to ajalkane For This Useful Post: | ||
|
|
07-04-2012
, 04:55 AM
|
|
Posts: 1,765 |
Thanked: 1,878 times |
Joined on May 2011
@ Poland
|
#16
|
I'm not familiar with Fremantle, but on Harmattan PageStackWindow's showStatusBar property should do the trick:
In C++ showFullScreen() should be called.Code:PageStackWindow { showStatusBar: false ... }
width: parent.width
screen.width
|
|
07-04-2012
, 09:48 AM
|
|
Posts: 1,765 |
Thanked: 1,878 times |
Joined on May 2011
@ Poland
|
#17
|
OK. I'm starting to work it out. showStatusBar should be true, and only showFullScreen() in C++.
Is there any way I set the width of the buttons to be resized as the screen rotates? With Column only I set
But with PageStackWindow the width is set well only after clicking the button pointing to the SelectionDialog. AndCode:width: parent.width
is always 800 even after rotation (then it should be 480)Code:screen.width
property int screenwidth: (screen.currentOrientation == Screen.Landscape) ? screen.displayWidth : screen.displayHeight
Can't find variable: mainView
import "." import "mainView.qml" import "mainView.qml" as mainView
|
|
07-04-2012
, 09:59 AM
|
|
|
Posts: 1,621 |
Thanked: 4,297 times |
Joined on Apr 2009
@ Germany
|
#18
|
| The Following User Says Thank You to nicolai For This Useful Post: | ||
|
|
07-04-2012
, 04:41 PM
|
|
Posts: 952 |
Thanked: 1,772 times |
Joined on Jun 2011
@ Finland
|
#19
|
But I've got another problem. I want to divide the program into multiple files but
Files are:
main.qml - the main one, only PageStackWindow
mainView.qml - Page used by main.qml
And I'm getting
I tried importingCode:Can't find variable: mainView
But nothing works.Code:import "." import "mainView.qml" import "mainView.qml" as mainView
thanx in advance
PageStackWindow {
...
MainView {
...
}
}
| The Following User Says Thank You to ajalkane For This Useful Post: | ||
|
|
07-05-2012
, 05:34 AM
|
|
Posts: 1,765 |
Thanked: 1,878 times |
Joined on May 2011
@ Poland
|
#20
|
You should rename it to MainView.qml. Remove the imports, they're automatically imported. But the naming is important, ie. capital start letter.
So after that you can use it in main.qml like:
Code:PageStackWindow { ... MainView { ... } }
![]() |
| Thread Tools | Search this Thread |
|
My N9/N950 projects: