* Riddell has changed topic for #kubuntu-devel to: "Kubuntu Tutorials Day now on https://wiki.kubuntu.org/KubuntuTutorialsDay" good evening friends anyone where for Kubuntu Tutorials Day? anyone here for Kubuntu Tutorials Day? o/ I am me me2 +1 \o yep \o/ yy me o/ I'll be impressed if we have any German or Spanish people here apparantly there's some sports match on but here we have an exciting programme of talks -*- yofel is german... yes yofel: I'm impressed :) https://wiki.kubuntu.org/KubuntuTutorialsDay if you haven't seen it the play is still some time away, I'll have one eye here and one there :P Here's an Honduran :P in an hour aalpert will be telling us about Qt Quick, the all new way to programme with Qt if you want to take part download the qt creator from here ftp://ftp.qt.nokia.com/qtcreator/snapshots/latest . -*- txwikinger is German-Canadian :p packaged versions aren't new enough Riddell: not even from Kubuntu Experimental? shadeslayer will be telling us how to package in Kubuntu, for that one apt-get install devscripts build-essential kdelibs5-dev is a good start keepitsimple: not even from experimental, the new Qt Quick stuff hasn't been released yet keepitsimple: If your about box in creator is anything less than 2.0.80, it's too old. great, got booted from the interwebs :) famous Qt author Johan Thelin should be turning up to talk about starting Qt programming apt-get install libqt4-dev for that one txwikinger will be talking about sorting out the good and the bad from bugs, all you need is a web browser for that one hopefully we'll all learn something new so this is the kubuntu development channel it's where most of the exciting development happens for the world's most friendly distro we're currently working hard on Maverick Meerkat which will become Kubuntu 10.10 due to be released on 10/10/10 Riddell: i live in a location where my download limit is restricted except for abt 6 hours daily... can i save the talks now and download the reqd files and work on it later ? will that be useful ? anirudh24seven: yes we'll have logs available for later reading although it's probably useful to follow along live even if you can't do all the examples yourself, you can still read and understand them every six months at the start of the cycle we meet up for an ubuntu developer summit to discuss our plans for Kubuntu (one of the perks of being a Kubuntu developer is that you may get sponsored to fly around the world to fancy hotels) the plans we have for 10.10 are written up here https://wiki.kubuntu.org/Kubuntu/Todo the highlights start with all new versions of your favourite software KDE Platform, KDE Workspaces and KDE Applications will be newly polished as well as fun new stuff like Google Gadget Plasma Support and useful new stuff like pulseaudio (which is now reliable enough for our high standards, and means you won't have different audio setup between KDE and non KDE applications) one notable change is we want to replace the default web browser with rekonq which is a lovely new all KDE happy web browser another big change is merging the desktop and netbook images into one, the correct workspace will be loaded based on what sort of machine you have of course you can change if you prefer the other workspace talking of workspaces we should have an all new one, Plasma Mobile, suitable for handheld machines it won't be very stable but ought to be good enough for a Tech preview label which means we're (well NCommander) working hard on getting everything working on ARM for a whole new range of devices -*- NCommander sticks his head in we have plans for an Application focused package manager "app store" to non Linux users not sure if that'll make it but it's something we need filling in the gaps in KDE we also have plans for new printer tools and fixing file sharing with samba the gents at Kolabsys want to work with us to create top quality Kontact packages to ensure you never have any problems with KMail Will the Application focused package manager be kubuntu specific or is it planned to get used over multiple distro's? well that nicely takes me to my next topic which is what is Kubuntu for and I think Kubuntu is for being a distro that brings the best out of KDE Software the way to do that is not to go creating our own distro specific tools but to make the best of what KDE offers we did used to have our own package manager but we didn't have the resources to maintain it so it's good for us and good for KDE if we use KDE Software so for an Application focused package manager, I'd like that to be done as part of KPackageKit Aweasome, that would make it more easy for my mom to install stuff :) that means we solve the problem for us and for everyone now this approach to KDE (being their biggest fanboy) can bring us into trouble if KDE has gaps it means that Kubuntu has gaps and network management has been a notable problem there -*- maco scowls at hidden ssid's maco: ah, so it is a known issue :) but in general the best way to get something fixed long term is to work with upstream if we do it ourselves it's likely we won't have the resources to maintain it in the long term micahg: yes, nixternal has complained for months, but i think he said putting in the BSSID (the MAC) manually worked for him. doesnt for me. :( my end goal is world domination for free software and anyone who has coded in free software knows that Qt and KDE make the best platform for that :) but of course :) Riddell: when do you believe to be able to achieve world domination? ;) so I'm a fan of using those technologies as much as possible and not using inferior technology or system proprietry technology and I also think linux distros should make releases, and do so with a good balance of stability without being out of date now world domination won't be achieved all at once it'll be one place at a time my trick is to take over places with good beaches and sun, that way you can enjoy yourselves while you do it taking over the canary islands was a big win there (Kubuntu is used in all their schools) I always knew your a genious we're currently in Finland for Akademy and it's surprisingly sunny here, 23.5 hours a day Must suck for the person who i saw complaining he wakes up when the sun gets up... Lots of time to work then ;) New Zealand is a nice place and we took that over a while ago (Weta Digital use Kubuntu on all their thouands and thousands of machines) and Weta Digital means that we already have a hold on Middle Earth and Pandora as well as District 9 (although i don't advocate doing an alien invasion to take over a country) oh we took over Georgia too (used in all their schools) which takes me to another topic translations we do this funny thing in Ubuntu where we put all of upstreams translations into launchpad then take them back out of there I had a friend in grade school who's father imigrated from Georgia. (Before Kubuntu's time, though) ;) Q: was Shaman considerd as a ackage manager? and that means recreating all of KDE's translations infrastructure which is fiddly and error prone simion314: yes we have looked at Shaman but it wasn't stable enough for use maybe JontheEchidna has looked at it more recently Yeah, it's not near being ready yet. Needs a lot of love there is a good reason to use launchpad for translations and it's due to the lack of an upstream translations community if we have say Georgia wanting to translate Kubuntu into Georgian, pointing them at .po files in KDE SVN and again for openoffice and whatever mozilla do for translations isn't going to be popular it's too fiddly by far for non geeks and too fragmented so launchpad helps them see what needs translating and in a consistent and easy manor but it has plenty of critics it means translations often don't get shared with other distros and it means upstream translations can be changed and launchpad might not have the right settings (e.g. lithuanian changed from having 3 plural forms to 4 and launchpad didn't notice) although I'm not sure how you can be unclear how many plural forms your language has :) launchpad does give us a nice way to have translations for Kubuntu specific bits of software such as the installer in general for KDE Software we advise people to do the translations in KDE but while there remains a lack of an upstream translations community it's unlikely to go away maybe there should be made a translation community thats not linked to any distro? acemoo: There is. right a cross project one Unfortunately different projects have different standards for how translations are done. we do have dpm now who is dedicated to sorting out translations problems, so if you have any do let him know one thing we can always do better in Kubuntu is Quality we always need more testers for new software whenever we make a PPA release of new software versions we need lots of testers and it can be surprisingly hard to find them sometimes so hanging around on kubuntu channels offering to help test is very welcome similarly for each alpha/beta/RC and final release we need to test the images for various install methods and it's very hard to get people to do that, it's time and bandwidth consuming but we can't release without it being done so we'd love for people to take part more there and of course we have lots of bugs report, txwikinger will talk later about helping to sort those well I think that's all the items I had to talk about any questions? Is project timelord still busy? do you use virtualization for that? apachelogger? JontheEchidna? emanuele: yes ISO image testing can be done in virtualisation Q: i had a panel related bug only in kubuntu, all versions but not in other distro is somethng diffrent in kubuntus KDE? is it vanila KDE or you put stuff in it? although I tend to use real hardware to be extra certain, but virtual machine installs are very useful too alvin: Project Timelord is a set of overarching goals to improve Kubuntu. We are still working on them. simion314: We do have some distro patches, but we try to keep them to a minimum. So it's not exactly vanilla, it's close. we do tend to consider distro patches evil but sometimes they're the best way Project Timelord has been taken in to consideration when planning out the goals for 10.10. It's a long-term vision for the direction of Kubuntu Q: I heard about a mac like menu bar being made in (k)ubuntu, hows that processing and is there any place where i could follow it? acemoo: Could you put that in more general terms for those of us who don't know about Macs? what about reKonq? acemoo: our very own agateau just recently posted an update about the global menu: http://agateau.wordpress.com/2010/07/05/getting-menus-out-of-application-windows-2/ simion314: we also use plasma's javascript to setup some bits on the panel (such as changing from knetworkmanager to the new plasma network manager) so it's possible that could have bugs Ah. That one. ScottK: yeah that one :) acemoo: We are looking into using that on netbooks this cycle if it's mature enough. I'd like to see the global menu being used in our netbook workspace for Maverick emanuele: For testing ISO's check http://goo.gl/pqUd && http://goo.gl/pTFd ^and of course non-netbook users will be able to opt-in for using the global menubar on the desktop if they wish and so would upstream (although they can't use it because it's not in stock Qt) This is an example of something we distro patch for. could netbook users opt out? We'll carry the patches for a cycle or two, but they'll go upstream in Qt 4.8. maco: Certainly. yay maco: right click-> "Remove this menu widget", just like any other plasmoid :) It would be removing a widget from the panel. Riddell: my problem is that the clock plasmoid is not full displayed, i use larger fonts then usual ,onlu in kubuntu and since Hardy i think, no such bug inArch or other kde distros JontheEchidna: yay 4.8? oh beef thats one way of getting people back to kubuntu :) simion314: I recally seeing that in the past. I don't see it in Lucid. acemoo: Qt 4.7 is already past feature freeze, so it's the first chance. This is all being coordinated with Qt and Plasma upstreams. simion314: nothing comes to my mind what could cause that, we certainly don't alter the clock applet, nor the plasma style ScottK: us still in lucid and still in kde4.5 packages Riddell: I think it may be related to font settings in k-d-s. (but since I don't have it anymore, I can't say for sure) simion314: so maybe try removing kubuntu-default-settings and seeing if that helps But if he's using custom font settings, k-d-s shouldn't be doing anything ScottK: Atleast its nice to see the global menu bar is so far in development already, I was afraid it might become vapor ware like the project I saw around kde 4.1 Q: what about the bluetooth stack in kde? ie there is no way to use mobile phone + bluetooth + internet tethering without console. acemoo: it's also nice that it works with GTK apps too (although they have plenty of bugs on their side but that's what you get for not using qt :) we have a new version of kde bluetooth tools coming in a couple of weeks user: Bluetooth is another area where sticking with KDE causes us to lag. Kbluetooth was unmaintained for a while, but it has a new maintainer now and so progress is being made. I'm told (by the author) it's a big improvement but networking may be another question user: You might try installing blueman (it's in Universe) and see if that works in the meantime. since that's mostly a network manager issue and KDE's network manager is a problem area as I mentioned earlier bluetooth pan + networkmanager would be very nice :) (while we stick with stock KDE stuff as much as possible in the default install, one advantage of being part of Ubuntu is we also offer the full breath of the Debian package archive if you want it) ohh right, i've been planning on using bluetooth to use my mobile to pause vlc because i hate getting up and walking to my laptop when am watching a movie on my tv screen user: thanks for reminding me about that, i keep forgetting about it talking about watching films, plasma media centre is showing progress I need to find the right person to talk to here at Akademy to see if it'll be ready for maverick Q: what are the relations between kbluetooth and bluedevil ? kbluetooth is old it got replaced by kdebluetooth and is now being replaced by bluedevil I believe well, kdebluetooth was the old, replaced by kbluetooth, but yeah :) plasma media centre? i didn't even knew about that... sounds interesting :) oh, my mistake I think kbluetooth is more recent than kbluetooth but ok i an using kde4.5 and the systemsettings looks bad in this versionm is it configured like this in KDE or is only a kubuntu stuff bluedevil will be replacing both soon, and then it won't matter :D Q: any idea if kbluetooth (or the recent one) supports bluetooth headphones? plasma media centre is a "10 foot" interface (or as we prefer to call it outside the US, 3.048 metre interface) yes ;) simion314: The system settings reorganization was made by KDE so you can use your computer from a distance to watch films and play music simion314: systemsettings got a major overhaul upstream in 4.5. http://adjamblog.wordpress.com/2010/07/07/rekonq-0-5/ <- shadeslayer 3 meter...? rats my tv is only 37 inch :S acemoo: that's distance from the TV, not size of it. systemsettings was a kubuntu project that got taken over by KDE upstream (long time ago) Riddell: no way really? wow bigbrovar: bluetooth headphones support is currently being implemented in kbluetooth according to what I've read recently bigbrovar: I just hated KControl so badly I had to get it fixed :) jgeact: you asked about rekonq, any paticular aspect? Riddell: nice to know kubuntu has done is bit for kde upstream ScottK: so its like a hardware and software combination? Will khelpcenter receive some updated content? now isn't a good time to test rekonq unfortunately, there's bug in flash and elsewhere, but I'm pretty confident they'll get sorted acemoo: Yes. I haven't used it a lot though. alvin: documentation is mostly an upstream issue and it can be considered a gap in upstream in places as such Kubuntu would like to help fill it and our docs man nixternal has been doing some of that but it's a big task there was an akademy award presented to a guy for documentation on Sunday so maybe things will pick up there again ScottK: with plasma media centre, should i expect to have an interface on my mobile to control the computer or what? plasma media centre can be used with a remote control or a keyboard or a mouse of course wireless keyboard/mouse works best but I think it's time to move on plenty of time for questions later I'm very happy to introduce our first guest speaker Riddel: no, only what new thing ahh.. i found the project page already :) acemoo: I haven't investigate media center at all. thanks for the talk Riddell And thanks for the support ScottK all the way from Australia, via Finland and here to talk about Qt Quick it's aalpert Hello :) hi ^^ Hi aalpert My background is that I'm a Qt developer and have been working on QML, since the project started. So ask me anything :). This session is an introduction to Qt Quick, which will be new in Qt 4.7 First up; What is Qt Quick? It's a marketing term for QML + Creator + the QtDeclarative module. To developers, it's pretty much just QML. Since we can get technical when we need to talk about details :) Onto the real stuff. What is QML? Qt Meta-Object Language (or Qt Magic Language, if you prefer) is a declarative user interface language. You can use it to declare the whole UI layer, plus some logic in JavaScript. And then you can stick the UI onto a Qt program. So when Johan talks about 'legacy' Qt stuff later, a lot will still be useful. Just don't worry about the widget bits ;) Actually, QML only really replaces widgets fully on mobile devices. On desktops, widgets still work fine. QML is also interpreted, so it can work anywhere. Including the next version of Kubuntu, which will probably will have 4.7 available (and have qmlviewer in one of the packages) Plasma integration is also in progress, and there were a few sessions on that at akademy so far QML is simple enough that designers can use it too do we have any designers here? Or anyone who doesn't like using C++? -*- keepitsimple all the way C++ Developers can enjoy QML as well, don't worry if you all enjoy Qt C++ already, you'll be glad to know that QML is designed to integrate well with it so QML can easily interact with QObjects that have properties, signals and slots if you designed your application with a good UI and data level split, then adding QML is really easy Let's now go through the hello world tutorial if you downloaded creator, you'll see a Qt Quick examples combobox on the welcome screen and from there you can select tutorials and you'll load up a project containing this, and other tutorials for others, I'll be going through it here line by line and since it's IRC, questions at anytime are just fine. Note that if you are looking at it in creator you might see lines like //![0]. Ignore them, they are just used to generate the example docs. aalpert: so far, everything you said is clear :) acemoo: Good to know :) First line of QML.... import Qt 4.7 Thought i'd give a little feedback so you don't think your here all alone :P How can I feel alone with 157 nicks in the channel ;) aalpert: this is in Cell.qml? -*- keepitsimple we are all ears This is in tutorial1.qml got it aalpert: could be 156 afkers? :P in the helloworld directory the creator screen currently loads all the tutorials, and all stages at once import Qt 4.7 imports all the types in Qt 4.7 so when we start using types later, like 'Rectangle', you now know where they are from and if you get error messages about not finding types, check your import messags and your spelling Next line... Rectangle { aalpert: Is it possible to only import 'Rectangle'? mariob: No. Module level is the only granularity you have ok isn't that a bit memory inefficient? only if you have bloated modules :P making the types available is not expensive. this merely means that the engine knows where to look to get the types i'll just hope and asume the qt modules ain't bloated then :) ohh.. and a module is often just one C++ library anyways the Rectangle { line actually creates a Rectangle element there is a matching close brace too, much later in the file between {} you can set the properties and children of the element the next line, 'id: page', sets the id of the element to 'page'. So that later in the file, you can refer to it as 'page' (and we will) next line 'width: 500; height: 200' sets two properties the width and the height. To values measured in pixels note that you can have a semi colon instead of a new line the next line sets the color to 'lightgray', in a similar manner aalpert: is it also possible to set a size relative to screen width or so? aalpert: in percents? wind-rider___: You can only set in pixels, technically wind-rider___: witdh*0.6 would work but you can use bindings to do exactly that and the bindings reevaluate when the width changes aalpert: sounds a lot similar to css... It's a little similar to css in terms of styling, yes. but without the cascading part. And I don't think setting things in CSS will reevaluate when the expression changes the next line, Text{, creates another element this element, as it's inside the Rectangle{}, will be a child of the Rectangle element and we set its properties over the next few lines anchors.horizontalCenter: page.horizontalCenter warrants a little more explanation though the anchor properties are another way to position elements and that line binds the horizontal center anchor of the Text to the horizontal center of the element called 'page' note that this is a binding, and so will reevaluate when page.horizontalCenter changes are all the elements in one namespace? seeing the Text element does not needs a special name for its parent element you can run the tutorial now, and see 'Hello World' and if you resize the window, and change the horizontal center, the text moves acemoo: The names have a form of scoping but you could use 'parent' instead of 'page' here inside a single QML file, you can usually access all the elements with an id things get more complex with multiple files so onto tutorial2.qml, which uses multiple files The change here, is a grid containing a lot of cells that are all very similar so we want to write the code for the Cell once, and reuse it. While the types Rectangle, Text and Grid are in Qt 4.7, Cell is not. So it will load the file Cell.qml to create the Cell type Now you can look at Cell.qml :) Item is just a simple type in QML, which is pretty much nothing but a bounding box. the line 'property alias cellColor: rectangle.color' creates a new property on this item, and calls it cellColor Item is like QWidget the base class for all elements? simion314: Yes, and like QGraphicsObject is the base class in QGraphicsView 'property' starts the property declaration, 'alias' is the type of property, and 'cellColor' is the name because it is an alias type, it's value is another property. And it just forwards everything to that property this is because, back in tutorial2.qml, we only have a 'Cell'. And the interface for that is whatever is declared in the root item of Cell.qml so to expose rectangle.color, we add an alias property the 'signal clicked(color cellColor)' line is similar. We add a signal to the item so that it can be used in the main file Another new element in this file is 'MouseArea'. This is a user input primitive despite the name, it works equally well for touch QML can be the entire UI layer, including user interaction. And MouseArea is a separate element so that you can place it whereever you want. You can make it bigger than the buttons for finger touch interfaces, for example to make it the exact size of the Item, we use 'anchors.fill: parent' which anchors it to fill its parent less obvious is the 'onClicked' line after that MouseArea has a signal called 'clicked' aalpert: in that case you should place the button shape inside a MouseArea and make it a child of MouseArea? wind-rider___: That is one way of doing it. You can also make the MouseArea large than the button and centered in it aalpert: ok Note that child elements can go outside their parent elements in QML while elements can click, this is off by default aalpert: ok, then it's clear :) and I'll point out a use of this when we get back to tutorial2.qml MouseArea has a signal called 'clicked', and thus a signal handler called 'onClicked' you can put a script (QtScript) snippet in 'onClicked', like in Cell.qml, and that snippet is executed when the signal is emitted so when you click on the MouseArea, the clicked signal is emitted, and the script snippet is emitted and the script snippet says to emit the clicked signal of the parent item, with container.cellColor as the argument. Back to tutorial2.qml, we can see this interface in use In each Cell instance, we set the cellColor property you don't need to import cell? and use the onClicked handler. files in the same directory are automatically imported if it was in another directory, or a module, you'd have to import that directory (or module) The Grid element positions the Cell elements in a grid by setting properties such as rows, columns, and spacing, we can control the details of how this occurs for some reason earlier I thought the Grid was 0,0 sized, but now I realize it isn't but if it was, then the Cells would still have the same x,y valeus *values and note that x,y positions are relative to your parent, just like in graphics view lol Pnux, there you go ;) and so if the Grid was 0x0, and in the same place, then it would look the exact same it's just that Grid does size itself to its children, and this is needed for its anchors.bottom to work Now that we've learnt reusable components in QML, lets move on to the bit you've all been waiting for. Animations tutorial3.qml makes this thing animate alpert: about tutorial2 aalpert: how come that Grid is also snapped to the left side of the window? x: 4 wind-rider___: in the code I only see that it's sticked to the bottom aalpert: ok, clear :) I overlooked it x: 4 is the same as anchors.left: parent.left; anchors.leftMargin: 4 we could do y: parent.width - colorPicker.width - 4 instead of the current anchros *anchors but in this case, the anchors are clearer tutorial3.qml does animations using states and transitions one trap to be aware of - these aren't the states and transitions of the State machine framework in Qt those are logical states, these are UI states Here, a State is just a set of property changes from the base state (called "") and a Transition is just telling it how to animate those property changes so in this file, in the Text element, we add a MouseArea, states, and transitiosn. And since I'm getting tired, I'll stop correcting my typos ;) We have a State, which we name "down", and the way we are entering it is through the when property. aalpert: and you'll make pnux think your a bot again ;) this is just a standard boolean property acemoo: use !help to get instructions for this bot aalpert: 20 minutes to go ;-) so the magic really happens because of QML's bindings. When either 'mouseArea.pressed' or 'true' changes, that property binding gets revaluated and you may find that this changes the value of the when property. true doesn't change often. But when mouseArea.pressed does, it makes 'when' true. And so the state activates itself and this applies the property changes in the PropertyChanges element we do try to make this language fairly self explanatory :) PropertyChanges has a similar syntax to the rest of QML. Once you set the target, it is just like you are in that item. So the 'y: 160' and 'rotation: 180' will be applied as if they were written inside the Text item with just the State, it would be boring. Comment out the transitions: line (and everything to the } of the Transition as well) to find out C++/JS style comments work in QML The Transition element says how to animate the property changes. the from and to properties on the element say which state you are going from and to or just select what you want to comment and ctrl+/ you can use "*" to match all states. But in this case we want to be specific. So that when we set the reversible property, it will use the reverse of this transition to go from the 'to' state back to the 'from' state The ParallelAnimation element just groups animations and when it runs, the animations in it are run in Parallel The first animation in it is a NumberAnimation, which animates numbers 'properties: "y, rotation"' means that it will animate the y and rotation properties so if these properties changed in this state, on any items, they will be animated in this way the rest of the properites in the NumberAnimation will define this exact way duration: 500 means the animation will take 500ms easing.type: Easing.InOutQuad means that it will use an interpolation function that has quadratics on both the in and out parts or something like that. The documentation has pretty pictures It's at http://doc.qt.nokia.com/4.7-snapshot/declarativeui.html But the docs don't suffer the same stability freeze as the rest, so they will still be improving for some time. aalpert: when I hold the mousebutton until the text is at the bottom and I quickly do a mouseup and I hold it again, the mousepress is not recognized anymore. can you explain that? or am I nitpicking? ;-) Will it only affect the text element? wind-rider_: Are you using an old version? tsvi: The animation will affect all elements whose y or rotation properties have changed in that state you can be more specific if you want wind-rider_: does it not recognize when its still reverting or also after that? acemoo: when it's still reverting wind-rider_: I can't reproduce. But I think you might be misinterpreting something here remember that the MouseArea is on the Text so when the Text moves, the MouseArea follows it so if you try to click again before the Text returns, the MouseArea isn't there You could make the MouseArea a sibling of the Text instead, to keep it in one place aalpert: you just made me try to go click the moving text, lets see if i can do that :) aalpert: that is it :) The fun thing about QML is that it is so powerful and dynamic, you get all these extra 'features' :) yep works :) The other animation is ColorAnimation, which automatically animates any color changes. is it possible to compile qml or is there only the interpreted way? user: It compiles transparently without you noticing. I don't remember if we cache the compiled output somewhere but I believe you have compiled it every time you run qmlviewer :) One goal of QML is to provide a clear declarative interface and not too much C++ interface that way, it's like a black box for your UI files and so we can make it magically faster every release :) note that distros won't install qmlviewer normally, you need to have some c++ to run it for a real application with Qt 4.7 aalpert: user probably means that one can ship just an executable file instead of an executable+qml file can you use qml with pyqt? Riddell: It'll probably be part of the qt-devel package though Riddell just said c++ yes it'll be available to install for developers You can create a Qt/C++ app and use QDeclarativeView to easily load a QML file (with a function call) maco: I'm sure the QDeclarativeView features will get bindings just like the rest of the Qt API if that QML file is in Qt resources, then you compiled the qml file into the application Don't forget to prefix resources with qrc:/ (at least in the previous releases of qml) from C++, use qrc:/ from qml, don't. we might need to beef up the docs on that use case Note that you can export your existing QGraphicsObject subclasses to QML with a couple lines, and then use them like Rectangle in case any of you have existing graphics view code lying around aalpert: when can we start seeing QML built apps in kde. and what does it really offer KDE and its app ecosystem I am speaking from a user non programmer point of view bigbrovar: From the User point of view, you'll see more fluid apps because developers can do the animations easier and UI scripting will be a little easier the KDE PIM guys are using it already for making e-mail and calendar apps using akonadi The benefit to KDE and it's app ecosystem is just another way of creating UIs, so it'll increase app quality indirectly and it'll be easier to port to mobile now. Because it's much easier to create the mobile UIs with QML Riddell: Are there any screenshots? :) I definitely backed the right horse then :) the KDE PIM guys seem happy with it for mobile even though they suffered through immense early adopter pains http://dot.kde.org/2010/06/10/kde-pim-goes-mobile but we've stopped changing stuff (well, will this week) and so it's stabilizing this is practically the first tutorial on it QML that won't go out of date really fast :) . bigbrovar: QML is a lot more accessible, so user non-developers now have a chance at writing plasmoids it's even easier than the JS bindings for plasmoids there won't be widespread use of QML until Qt 4.7 is released, it's still not in general use I think I'm out of time, for further questions we have #qt-qml on freenode QML is still pre-release. I doubt there will be much adoption until 4.7 is released later this year hopefully in time for kubuntu 10.10 aalpert: will the designer integratation be coming back at some point? Riddell: At some point. When it works well enough. When should i expect a preview version of qt 4.8? since it doesn't right now, it's not coming out soon but we will try to get something visual to help people in QtCreator 2.1 it looked very slick when I saw it, means you can make QML interfaces without caring much about the code acemoo: trunk is already 4.8 qt.gitorious.org great for designers 5 minutes break now before the next tutorial The designers I talked to liked it, but were okay at writing the code too but they were really good designers :) aalpert: aweasome, then the global menu bar can't take too long to be going to different distro's as unstable/testing :) aalpert: I was there listening your presentation on aKademy too today, both presentations where good :) Thanks oops *were good probably I'm also a bit tired already, it's been a long day in aKademy One warning about QML that I forgot to give: The main team working on it is in Brisbane (GMT +1000) aalpert: thx for your tutorial :-) so the irc channel might be a little underpopulated while some of you are awake in that case, we can join are wise heads together :) aalpert: thanks for giving the nice tutorial and helping work on making QML thanks! I'm always happy to show people my pre-release software :) we are now due a packaging session however shadeslayer isn't around to give it so I'm going to make one up on the fly! anyone want to follow along? (shadeslayer's internet fell over, if you're all thinking he's playing hooky) I'm interested, even though am on arch.. he's got flooded away in the monsoons oh my how unfortunate You can give some tips and best practices or something like that every few weeks KDE make a new release of their software compilation Thanks for the tutorial and our crack team of packaging ninjas jumps into action to package this packaging for the development version (Maverick) and usually backporting it for the stable release just such a release is about to happen KDE SC 4.5 RC 2 is coming, what a lovely acronym filled name and as crack ninjas we get the tars a few days early to package them up so everyone here is now a crack ninja and can get the tar early you just have to remember it's top secret until release Riddell: I heard all ninja's got killed like long long ago.. how can you still be a ninja? :o -*- Quintasan sets up an ambush for acemoo acemoo: not true! i met a guy studying ninjitsu at the art store down the street ninjas are skilled in the arts of deception and hiding sorry.. someone at my school gave a presentation about ninja's 2 weeks ago.. :D wget http://people.canonical.com/~jriddell/tmp/kdetoys-4.4.92.tar.bz2 that's the top secret tar now for Debian packages the name of the tar needs to follow a paticular format toys are always great :) so rename that file to kdetoys_4.4.92.orig.tar.bz2 and extract it (tar xf kdetoys_4.4.92.orig.tar.bz2) now we need to get our packaging which we keep in a bzr archive bzr co lp:~kubuntu-members/kdetoys/ubuntu if you don't have bzr installed, you should, it's the best version control system ever it's like git, only usable LOL I thought that was mercurial's tagline... you could also just download the packaging from the current kdetoys package https://launchpad.net/ubuntu/+archive/primary/+files/kdetoys_4.4.90-0ubuntu1.debian.tar.gz (I found that on https://launchpad.net/ubuntu/+source/kdetoys ) either way you'll get a debian/ directory we use the debian packaging format in ubuntu of course Not. I got ubuntu/ dir am installing bzr atm y me too tsvi: but inside that should be debian/ 46k/s \o/ ok -*- Riddell pauses so people can catch up -*- user catched up :) -*- acemoo catched up good enough :) you need to move the debian/ directory inside the kdetoys-4.4.92 source tsvi catched up (how doyou do this message thingy?) tsvi: /me then change directory cd cd kdetoys-4.4.92 type there, obviously don't just type cd or you'll go to your home directory ohh sweet, thats better as cd ~ :) see, I said you'd learn something :) now we need to update the changelog with the new version number dch -i should open up a text editor with a new entry ready to be added to debian/changelog dch is in the devscripts package those of you following on arch will need to just edit debian/changelog and add a new entry manually :) alright now we are ready to build it debuild is the magic command it may well tell you that you don't have everything installed " Unmet build dependencies" so you need to install them .orig. file should be in the same dir as kdetoys-4.4.92 why dont use pbuilder instead of installing every dependency into the running system? kdetoys_4.4.92.orig.tar.bz2 should be outside the kdetoys-4.4.92/ directory rats, no debuild for arch.. i'll just read along further then pbuilder is a nifty script that will set up a chroot and install the packages and build the package but it's only useful for a final check I forgot the ? sorry Riddell: apt-get build-dep kdetoys <-- might help at least get close on build deps (and should do the trick if there are no new deps) pbuilder isn't useful for doing a first package because you can't check everything is correct at the end okay debuild says: This package has a Debian revision number but there does not seem to be an appropriate original tar file or .orig directory in the parent directory; (expected one of kdetoys_4.4.90.orig.tar.gz, kdetoys_4.4.90.orig.tar.bz2, kdetoys_4.4.90.orig.tar.lzma or kdetoys-4.4.92.orig) continue anyway? (y/n) ah hah you need the right version number in debian/changelog I think dch didn't bump the version Where do I get kde-sc-dev-latest (>= 4:4.4.90) libphonon-dev (>> 4:4.7.0really) 4:4.4.92-0ubuntu1~ppa1 is it user: try this-> mv kdetoys_4.4.92.orig.tar.bz2 kdetoys_4.4.90.orig.tar.bz2 tsvi: from the 4.5 repository http://www.kubuntu.org/node/157 changing the version number in the changelog file did it keepitsimple: it's a BAD practice to do this :P our version numbers are a little fiddly 4:4.4.92-0ubuntu1~ppa1 4 is the epoch and only gets changed if you mess up. 4.4.92 is the upstream version -0 is the debian version we often take packages from debian in which case it would be set to 1 in this case the package isn't from debian so it's a 0 then the ubuntu version number then the PPA number because we usually put packages in a PPA before uploading to the main archive for the changelog text I usually put "New upstream release" anyone got it compiling? wip -*- Quintasan <3 pbuilder Riddell: will we bump epoch if we get to KDE 5 someday? :D Whoaa kde-sc-dev-latest (>= 4:4.4.90) libphonon-dev (>> 4:4.7.0really) is a serious download hopefully will be ready by the end of the session tsvi: well, it downloads developments files for KDE, that's a ton of headers :) Quintasan: no, we'll only bump the epoch if KDE decides to change version format. maybe they'll change to KDE 04.10 after the month and year, then we'd need to change the epoch Unmet build dependencies: kde-sc-dev-latest (>= 4:4.4.90) quilt libphonon-dev (>> 4:4.7.0really) :) I got it compiled! I think that means I win lol the next thing I do is check over the build log which is in the directory above the sources and make sure the cmake output doesn't complain about anything missing new KDE Software releases add new programmes and often need new libraries then I need to check that all the files are actually packaged the debian/*install lists which files should go into which .deb package often new files are added for a new release so you can run this command to check if there's any missing dh_install --list-missing I can also run lintian over each of the .deb packages lintian runs lots of checks on .deb packages for common errors some of which I care about and some I don't care so much I get this warning for example W: kteatime: binary-without-manpage usr/bin/kteatime well I think kteatime is a trivial enough application with few enough users that it's not worth my time making a man page but then if we get lots of confused kteatime users who don't like kubuntu because they can't understand how to time their tea I'll have nobody to blame but myself If it makes you feel better, feel free to blame me ;) acemoo: you know you will get tons of kteatime fanatics (including me) standing at your doors? :P so now it builds and you know there's no files missed out of the .debs then you can use pbuilder which will make sure it builds in a clean environment often my computer will have packages already installed which are missed out of the build-dependencies and pbuilder will catch that it can be quite time consuming though Quintasan: i like kteatime.. but i have too many different teas that i dont know the times of... so i stopped using kteatime and i just leave the tea in the water for ages... final step is to build the source package and upload debuild -S will build the source package Finished getting all dependencies ... Finally a source package in debian packaging is made up of the upstream .orig.tar.gz , the debian.tar.gz and a .dsc which is meta data with md5sums the debian.tar.gz contains the debian/ directory you can upload it to your PPA if you want to let people use it everyone with a launchpad account can have a PPA but you will need to have your gpg key in launchpad So you have your deb file which is essentially a tarball containing these 3 files? no the .deb files are the binary packages you can use lesspipe to view their contents lesspipe kteatime_4.4.92-0ubuntu1~ppa1_amd64.deb the source part is kdetoys_4.4.92.orig.tar.bz2 kdetoys_4.4.92-0ubuntu1~ppa1.debian.tar.gz and kdetoys_4.4.92-0ubuntu1~ppa1.dsc if you do get the source package built you can sign it with your gpg key debsign -kjriddell@ubuntu.com kdetoys_4.4.92-0ubuntu1~ppa1_source.changes using the e-mail address on your gpg key then put it into your launchpad PPA dput ppa:jr kdetoys_4.4.92-0ubuntu1~ppa1_source.changes using your launchpad username in place of "jr" launchpad will then build the package and make it available hopefully in less than an hour So launchpad uses the sources to give me the .deb file, I finally got it yes Took me 5 years of using ubuntu to figure this out I can't believe it and it'll compile it on i386 and amd64 and if I upload it to the main ubuntu archive it'll compile on arm and the other weird architectures the way you get privilages to upload to the main archive is fairly straight forward you contribute to kubuntu (or another part of ubuntu) for a while then you can apply to be a kubuntu member which involved turning up a meeting and being grilled to be sure your heart is really in the right place for us then you contribute for a bit more then you can apply to be a kubuntu dev then you get grilled once again which involves turning up a meeting and being grilled to be sure your packaging skills are elite ninja standard so.. how many ninja's does kubuntu has now? btw: is there a good packaging documentation somewhere? ^^ user: there's lots of documentation out there user: yes, ninja typical environment -> https://wiki.kubuntu.org/Kubuntu/Ninjas/BuildEnvironment debian new maintainer guide and ubuntu packaging guide for example I get debsign: gpg error occurred! Aborting.... user: Packaging Complete Guide -> https://wiki.ubuntu.com/PackagingGuide/Complete I've never been too impressed by either though tsvi: that means it's all compiled and finished tsvi: it just means you don't have a gpg key with a name and e-mail matching what you used in debian/changelog lol... even the url has ninjas.. i thought riddell made it up user: though that ninja wiki is a little bit out of date https://edge.launchpad.net/~kubuntu-ninjas/+members 21 members some are more active than others of course and some have their special ninjas skills, like NCommander and his arm fixation tsvi: you have to add in your ~/.bashrc two lines, export DEBFULLNAME="your name" and export DEBEMAIL="name@hostname.whatever" what if i want to recompile some binary with different options? [libqapt] jmthomas * 1147313 * trunk/playground/libs/libqapt/src/ (backend.cpp backend.h) - Add two methods for retreiving the download size and the required disk space for marked changes - Add a method for returning the human-readable label of a package origin, given a QApt::Package pointer. angelus85: then you have to change debian/rules which is a Makefile that tells the package how to actually build angelus85: for the most part we just include standard stuff in debian/rules and it'll do the right thing Where is the build log? i was trying to compile pam face recognition but i had some problems with some libraries so that's why i was asking (segfault of course) [muon] jmthomas * 1147314 * trunk/playground/sysadmin/muon/src/StatusWidget.cpp Use the new methods in LibQApt to show in the statusbar how much is to be downloaded/installed Where does debuild put the build log? tsvi: kdetoys_4.4.92-0ubuntu1~ppa1_amd64.build in the directory above let's have a wee break before the next session if you do fancy helping the ninjas with the next KDE release, just stick on this channel ok coming up next is our second guest speaker I'm very pleased to introduce Johan thelin top Qt developer take it away e8johan :-) thanks -*- Quintasan claps so, let me start by saying hi all hi johan my plan today (tonight) is to go through the creation of a hi o/ very simple application using Qt Creator just to go through the concepts of Qt, getting started and heading in the right direction just a quick question before we start, how many of you have experience from Qt Creator? o/ e8johan: I do, created a small useless app :) \o worked half a year on a project with it good to see some hands - so I'll try to stick to the Qt code part, not the tool then do tell if you want me to point something out to you :-) either way, let's start by firing up Qt Creator from the first screen you can choose to create a new project - do that it'll bring you to a wizard I do, worked through the tutorials and used it for some coding at work (all C though) what you want to create is a Qt4 Gui Application Riddell: er, I would have tried to phrase that a different way :-/ cmagina: C-coding should be about enough for this - feel free to ask if the C++ is giving you trouble Done the tutorials, quote long time ago though... so, when you have decided which type of project to create, let's name it I've called my version listexample when naming it and choosing a directory, be aware that the project name is the name of a directory i.e. do not name the directory listexample as well that will just give you double directories the next page of the wizard if interesting as it shows you all of Qt's modules for now, Gui and Core will be just fine, but if you're curious, you can always check this site I have Class Information http://doc.qt.nokia.com/modules.html I also get class information Same here hmm, ok, things might have changed places or something, class info is next for me what class information does is that it sets up a skeleton project for you some code to get started from I believe we are all running the latest beta with Qt Quick the default choice is to use a QMainWindow (in my case) cmagina: ok, I'm running Qt Creator as packaged from kubuntu i.e. not bleeding edge, just the default package I'm sure that it will be ok either version, just tell me when I say things that seem strange to you :-) the default choice, QMainWindow, is a bit of an over kill for a trivial example it is a window with menus, toolbar, statusbar, dockable areas, etc everything that you expect from a document centric desktop application the other two choices are QDialog and QWidget a QDialog is a window with a result - e.g. yes/no, ok/cancel, etc that is not what we're after, so choose to use a QWidget also, accept the default name of Widget (if you don't want to patch my code snippets all night :-) ) a question to you who are running bleeding edge, do you get modules now? or do you get project management? e8johan: project managment ok, great Yup I'm using the default version, so everything is great for :) we just skip project management for now - it is just versioning - so click finish and you'll get a freshly baked skeleton project the project consists of four files main.cpp, and the h, cpp and ui files for our Widget class don't forget the .pro file ;) aha! you are right :-) looking inside the pro file, you can even see that it refers to the other files... specially important for the people who did not get to choose modules before you are absolutely right, the pro file is where the modules get selected or deselected looking at the Widget class, the cpp and h files define the class to C++, while the ui file defines the user interface modules = QtCore QtNetwork? the ui file really is an XML file, but Qt comes with a visual editor for them jgeact: do you get that with the bleeding edge version? jgeact: you only need QtCore and QtGui and that is the default choice i get "QT += core gui" in qt-creator 2.0 on arch ok acemoo: that sounds about right does everyone have the project with the right modules in place? I have the same as acemoo yup you can try running the application - click the green arrow in the lower left corner and you'll get an empty window -*- tsvi ready (if all is correct, that is) oh frick am still double o -*- Quintasan got it running let's fire up Designer then :) -*- alvin uses qtcreator 1.3.1. Looks good we get Designer started by double clicking on the ui file this should give you loads of new panels with your empty window in the middle I have :-) -*- tsvi got it the panels that we are going to use tonight are the widgets box (to the left) and the property editor (to the right) if you have fresh installs, you might have loads of other stuff as well - do not be shy when it comes to closing or making them smaller :-) you can always get them back you can see a small screenshot for the application that we will go through over here: http://www.thelins.se/johan/blog/resources/project-source-kubuntu-tutorial-day/ aww no signals and slots tonight? thats something special i like about Qt:) (you can get the full source there as well - but that is cheating) acemo: you will get signals and slots \o/ acemo: we just need some widgets to get signals from :-) in the screenshot you can see three QPushButtons to the right and a QListWidget to the left try placing them roughly as in the screenshot in designer then add a vertical spacer underneath the buttons the spacer looks like a spring and acts like one as well - it pushed the buttons to the top of the window when you have all the widgets in place, click somewhere in the window itself to select it and choose to apply a grid layout you do that form the toolbar, not from the widgets panel it can be scary applying layouts - things can get messed up, but then you can just break the layout again from the toolbar and try again the point of a layout - instead of just static coordinates is that widgets can resize for new languages or fonts and that the user can stretch the ui to utilize more screen when you feel that the design looks about right, try running the application again and resize the window a couple of times are everyone keeping up? no problems so far great Everything is great here so lets just get names and properties setup I'm happy too yes. Cool! :) how do I apply th elayout? double click on each of the buttons and give them the right texts okey Context menu -> layout... txwikinger: select the window and click the grid (3x3 blue boxes) in the toolbar txwikinger: right click on the "window" and choose layout -> lay out in a grid context menu should work well too ah thanks the idea is that the layout is applied to the container widget. the most common mistake is to select the widget about to be laid out. e8johan: yep, happened to about everyone in my project :) -*- tsvi ready for the next step when you have given the buttons texts, select them one by one and change the objectName property (at the top) and name them addButton, deleteButton and clearButton also, select the listWidget and look for the selectionMode property set it to ExtendedSelection when all this is done, save the file and open widget.h (just double click it) in the header, you see the Widget class being declared e8johan: what the Extended Selection does? ExtendedSelection means that you can make selections using shift and ctrl, instead of just selecting a row at a time you can pick between one item, continous ranges of items, or extended oh, nice when using qtcreator 2.0 to find the .h file first click on edit totally left the other options lets the user toggle selected or not by clicking items, or disable selections since design mode does not shows the file list :) acemo: aha acemo: sounds like an improvement, that panel tends to eat quite alot of screen when you are in widget.h, you can see the line Ui::Widget *ui e8johan: indeed, huge improvement that refers to the design that you just created all the widgets are available through the ui variable just an important tip - as we will move between the header and source file quite often - simply press F4 to do that so trying that shortcut, you can go to widget.cpp in the constructor (i.e. the Widget::Widget function for the C user out there) you can see ui->setupUi being called that creates all the widgets that you just designed now for the signals and slots part! @_@ \o/ :-) signals and slots is really what makes Qt tick :-)) -*- Quintasan used to define all widgets within constructor it really helps creating reusable code Quintasan: this way, you still do, but you let Designer generate the code :-) -*- txwikinger wonders where to put the unit tests first :) e8johan: indeed it does, signals and slots help you save loads of code and headache's basically, signals are emitted when interesting stuff happens txwikinger: you need to separate ui from logic :-) interesting stuff can be buttons being clicked, sliders moved, etc they are kind of like events, but at a higher level (events are more mouse moved, key pressed, etc) signals are always emitted by widgets, but to have something happen, you need to create a slot and connect it to signals you can create any number of signals to a slot, and any number of slots to a signal, etc but, let's focus on the practical side of things jumping back to widget.h (remember f4) add a section called private slots: signals and slots are a bit like the Observable pattern, when something interesting happens with the observable you get informed if you want acemo: yes, that is basically what it is, and all QObjects can have observers connected to them in that section, add a function declaration for void addClicked() e.g: private slots: void addClicked(); does everyone feel comfortable adding a section and a function declaration? e8johan: Q_OBJECT <--- tutorials define this as some magic, where can I read what it does? Yep yep So far so good :P Quintasan: Q_OBJECT does define the magic that ties all this together, I'll give you a link after this session (remind me - I'm forgetful) ;-) Quintasan: that enables the signals and slots, and some other stuff so, lets move back to widget.cpp now implement the same function, i.e. void Widget::addClicked() { } Yeah, I've looked at what it adds back when I did the tutorials... just to make sure that our connection works, let's just add the line qDebug("Hello"); in the function body (qDebug is a bit like printf, but adds \n on its own initiaitve) now, in the c'tor, under the setupUi call, let's make the connection e8johan: i'm used to using qDebug as a cout replacement: qDebug() << "Hello"; connect(ui->addButton, SIGNAL(clicked()), this, SLOT(addClicked())); running the application after this should give you the text Hello each time you click the add button Just for clarity both the section and the function get defined in the widget class? tsvi: yes clarifying about tsvi's question, add the section to the Widget class slots can be defined as private, protected or public and can be considered ordinary functions it is perfectly ok to call a slot as any other function the "slots" keyword is just a marker for Qt did anyone have any problems creating the connection? Works here no, all ok if you do, you will get the error message at run-time auto-completion is awesome great! so, let's add some real code to that slot first, go to the top of widget.cpp and add an include for QInputDialog notice the caps and no ending .h Qt wants to play at the same level as stl :_) the QInputDialog is a class that lets us request basic user input without too much work in the addClicked slot, start with: Quintasan: http://doc.trolltech.com/main-snapshot/metaobjects.html <- about "the magic" QString text = QInputDialog::getText(this, "Enter Text", "Text to add:"); apachelogger: thanks (also, remember to remove the qDebug line) apachelogger: thanks, one more memory slot freed in this end :-) running fine :) the QString class is Qt's string class full unicode, implicit sharing (read efficient and fast) it can also tell the difference between an empty string and no string if the input dialog is closed through cancel, we get no string while the user can still input an empty string and click ok we check this through the isNull method if(!text.isNull()) then we add the text ui->listWidget->addItem(text); running the app now should mean that you can add items to the list common operations are often available as slots for example, clearing a list returing to the c'tor, add another connection connect(ui->clearButton, SIGNAL(clicked()), ui->listWidget, SLOT(clear())); now you can clear the list as well notice that the button can be connected to either our custom Widget, or a QListWidget - the button does not care that is part of the greatness of signals and slots now, the only button left is the delete button e8johan: clear() is defined by Qt headers? Quintasan: yes nic +e if you press F1 while standing on ui->listWidget, you get the docs scroll down to public slots and you'll find it Quintasan: clear() is a slot just like the add one we just made, but on the QListWidget class for the delete button we will need two slots one for the deleting, and one for enabling and disabling it it makes no sense to have it enabled when no items are selected f1 to the header and add the following slots to the private slots section void deleteClicked(); void updateDeleteEnabled(); then jump back to the widget.cpp and add empty function bodies for the two u mean f4 to the header f4 to the header, yes, add them then f4 back to the cpp oh - wrote f1... sorry it is getting late here :-) e8johan: i was thinking what has the documentation to do with adding my own code :p... yep late here aswell in the c'tor, make the following connections connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked())); connect(ui->listWidget, SIGNAL(itemSelectionChanged()), this, SLOT(updateDeleteEnabled())); acemo: lol the idea of the updateDeleteEnabled slot is to update the enabled state of the deleteButton e8johan: according to what we change the member aka 3rd parameter? depending on what is selected angelus85: pardon? e8johan: the 3rd parameter of connect [libqapt] jmthomas * 1147328 * trunk/playground/libs/libqapt/src/ (backend.cpp backend.h) Some changes necessary for filtering by origin support in muon i see it changed angleus85: when did it change? it is this for all except clear, where it is ui->listWidget sometimes it was this and some others it was ui->listWidget ah, ok, the 3rd argument is the object that has the slot the 3rd parameter defines which object to connect to [muon] jmthomas * 1147329 * trunk/playground/sysadmin/muon/src/ (7 files in 2 dirs) "Filter by Origin" support, complete with human-readable repository names. we implement all slots except clear the 4th being the slot name clear is implemented by the QListWidget itself, so then we need to connect the signal to it instead of "this" (i.e. Widget) back to updatedeleteEnabled, the connection calls it upon change but we need to call it once at the start, just to get everything right from the start so add a call to is in the c'tor after the connections Riddell: will be also be using the new font in kde? (this shows how you can call a slot as a function - it just works because it is simply a function) so, let's follow that trail and go to the implementation of updateDeleteEnabled we can query how many items are selected through ui->listWidget->selectedItems().count() so, let's add the following lines if(ui->listWidget->selectedItems().count() == 0) ui->deleteButton->setEnabled(false); else ui->deleteButton->setEnabled(true); this should enable and disable the button as needed then, all that is left is the deleteClicked implementation we can get all the selectedItems from the list widget the beautiful thing is that all items are objects, and if we delete the object, it automagically keeps the list widget updated on this so, all we need to do is get them and delete them (this also updates the selection, handing the enabled state of the delete button for us) so, in the deleteClicked slot, start by adding the following line QList items = ui->listWidget->selectedItems(); now we kind of left C territory with templates QList creates a list of QListWidgetItem pointers that list, items, is initialized to contain all the selectedItems of the listWidget QList is one of Qt's collections it is the most common to use - there is QVector (quicker indexed lookup, slow insert) and QLinkedList (quick insert, slow indexed lookup) as well to iterate over the QList, items, we use the Qt macro for each foreach(QListWidgetItem *item, items) this is equivalent to setting up a for loop and having item going over all items of the list now, all that is left is to delete the items one by one, i.e. ohh, great! delete item; i didn't knew about that macro yet qt looking really cute acemo: that macro is really great - compared to iterators and whatnot tsvi: you don't pronounce Qt as cute for nothing ;) there is a forever as well - but that has more limited use :-) foreach(QListWidgetItem *item, items) e8johan: If We weren't done with this school project, i'd go and replace like 150 iterators :p I get ton of errors on this forever is a while true? having added these lines of code, you should now have a trivial but working application Quintasan: which is the first error? hmm copypasta did the work :-) if you do run into issues, try comparing your code to the code at http://www.thelins.se/johan/blog/resources/project-source-kubuntu-tutorial-day/ that is the cheat sheet :-) It worked also, for the docs, try http://doc.qt.nokia.com/latest tsvi: congratulations! no fun with comparing code, experimenting ftw! very well Haha, works here as well in the Qt docs you will find a link "Overviews" at the top, that is a great starting point then I ran into this the other day: http://qt.nokia.com/developer/learning/online/training/modules I've not looked at them yet, but I'm told that they're good now you all have something that works, it seems, and if you attended the previous session, you can also package it works like a charm :) so now there are really no excuses to get coding and contributing :-) \o/ did i miss something or should we have the foreach loop empty? looking at the schedule - it also looks as if you have trouble, the next session is the one for you :-D no excuse, perfectly thanks very much e8johan ohhh delete item; ofcourse :) thanks e8johan! you can also purchase a copy of Foundations of Qt Development available in all good book shops if you do get in trouble, or need other Qt help, you know who I am :-) Thank's e8johan :-) Thanks e8johan! e8johan: when you new book for? thanks e8johan! Thanks for listening - it was fun! by jgeact: not sure... Johan Thelin e8johan: I came late, will this transcript be posted somewhere? maxwellian: yes we'll put it on the wiki page and , do you like QtCreator? -*- matrixx *claps hands* https://wiki.kubuntu.org/KubuntuTutorialsDay e8johan: thanks a world :) thanks alot e8johan, i'll think about getting your book ^^ since you managed to learn me something new in a basic tutorial.. :) in a couple of minutes we'll start txwikinger's session on beastie hunting jgeact: more and more, it is growing on me Riddell: Thanks, I'm using Ubuntu but this looked like great info. Thanks for the link. -*- txwikinger is cleaning his screen from all those qt creator stuff :D jgeact: I've always used a term + kate, so I'm not too religous about editors Riddell: well, means there are no good book shops in Poland :D thank you next up... txwikinger is going to talk to us about handing beasties txwikinger is one of our best Kubuntu developers go ahead txwikinger thanks Riddell ok folks.. everybody still fresh for looking for bugs after these exciting sessions about qt ? \o/ I will talk a little about our process dealing with bugs in launchpad Most of the process is the same for all packages in our repos So it does not matter if it is a KDE package or something else However, for KDE packages we often don't even get in contact with the bugs if they are send straight to the KDE bug tracker So the topic is === What is bug triage? === The word triage comes from the French word trier which means sorting, sifting (see http://www.m-w.com/cgi-bin/dictionary?book=Dictionary&va=triage) Commonly it is used in the field of medicine, especially in the context of emergency rooms, disaster situations, basically when limited resources must be allocated to a high number of patients. This in an analogy that also describes what we do with bug-reports. When they are submitted, they must be checked if the adhere to a certain standard, contain all the necessary information that they can be fixed and be sorted and classified in order to get the right "resource" to work on it. In some way someone who triages bugs is something like a facilitator or arbitrator. You work with the reporter in order to retrieve as much information as possible. You also work with the developers for kubuntu and ubuntu as well as upstream distributions like KDE and debian and others in providing the information or finding out what information is needed. Due to the fact that all of this concerns people it is very important that bug triage is done with a lot of patience and humility. There are sometimes different interests that need to be mitigated when decisions are made, and it is always the best to be as polite as possible to everybody around (see also Ubuntu CoC https://launchpad.net/codeofconduct/1.0.1) or which ever CoC is active .. I think we actually have a newer one now The bug triage happens on launchpad https://bugs.launchpad.net/ In order to be able to triage bugs effectively, you must have an account on launchpad. === There are different elements to triaging bugs === ==== 1) Cleaning up bug reports: ==== Bugs are often submitted by reporters that do not understand fully the process. On the other hand, the people working with the bugs need efficient access to the information. Therefore it can be very important to clean up the bugs summary to soemthing that is meaningful that in a list of reports someone already understand the main issue of every report in the list. It can also be helpful if certain important information is added to the description of the report, since this is the first thing after the summary one would read. Let's look at this bug https://bugs.edge.launchpad.net/kubuntu-ppa/+bug/599175 Launchpad bug 599175 in Kubuntu PPA "Amarok doesn't save my layout configuration" [Undecided,New] amarok has bugs? :D Nightrose: you promised it had none! Well.. someone seems to think so However, if you look at this report, you see it is not really actionable It does not give any information about the release of amarok, or Kubuntu It does not explain very detailed what has been done to create the issue It explains a little bit the expected result In this case, we could start to clean up the report by reproducing the issue ourselves and filling in the gaps or we can ask the report to collect more information ==== 1) Cleaning up bug reports: ==== sorry ==== 2) Colleting more information in order to be able to triage and/or reproduce and fix a bug ==== This is in my opinion the most important step of bug triage. In an ideal world, a bug report has a description that allows anybody following it to immediately reproduce the bug. That is not always possible, but a good target. It is good practice to see if the description given is sufficient to reproduce or see the problem and if necessary add additional information if the problem is found. If you look at https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/102979/comments/2, I had gone through the steps in the description and found actually a workaround for the problem. I have added this information and confirmed that there is really a problem, that anybody can reproduce. Launchpad bug 102979 in ubiquity (Ubuntu) "[kde-ui] next button does not respond to keyboard (dup-of: 46600)" [Low,Triaged] Launchpad bug 46600 in ubiquity (Ubuntu) "cannot select `continue' with keyboard in kde" [Medium,Triaged] Since there was a workaround, I also added it to the main information https://bugs.edge.launchpad.net/ubuntu/+source/ubiquity/+bug/102979 Launchpad bug 102979 in ubiquity (Ubuntu) "[kde-ui] next button does not respond to keyboard (dup-of: 46600)" [Low,Triaged] Launchpad bug 46600 in ubiquity (Ubuntu) "cannot select `continue' with keyboard in kde" [Medium,Triaged] This allows others to now work with the issue while it is solved, and the developers haev more information that they can fix the problem Often this steps includes to ask the right questions to the submitter that allows them to give more accurate information that is needed. And we actually have a list of standard reponses which can be used to ask the reporter for more information ==== 3) Sorting tasks. ==== ===== 3a) Assigning the report to the right package ===== Often bug reporters do not know which package contains the program they have found a problem in they either choose a wrong packages or don't give any package Therefore, an important part of the sorting of the reports is to assign them to the right package. This allows the right people to look at the bugs. Here are good instructions on how to find the right package to assign a bug to: https://wiki.ubuntu.com/Bugs/FindRightPackage ===== 3b) Entering the correct status: ===== https://wiki.ubuntu.com/Bugs/CommonTasks#Setting Status gives an overwiew of the different states a report can have. For the triage, the essential states are New, Incomplete, Confirmed and Invalid. well.. unfortunately the wiki link inside the page does not work correctly here it is section 9 on the page It is important to make sure that the status of any report is set correctly because this is one of the most important filter criteria for people working on bugs Every report start with the state New. When somebody starts to triage it and more information is necessary it will be set in the state incomplete until all the information is in the report. Wenn information is missing like in the amarok bug before, the status would be set to incomplete When all the information is in the report and the bug can be reproduced it will be set to the state Confirmed. Or if the triager is part of the bughelper team, it would be set to triaged so anyone can set confirmed but only elite people can set it to triaged? only people who have gone through the mentorship program for the bugsquad can set the status to triaged or people in (k)ubuntu-dev? however, it is not very difficult to be accepted there, we just want to make sure that people know the policies and have read the relevant wiki pages yes developers have the access too AFAIK However, something very important, reporters should not set their own reports to confirmed or triaged in most cases This forces a second pair of eyes to look over the issue and maybe weed out odd issues in one particular installation A lot of reports will turn out either not to be bugs, or it is impossible to collect the necessary information that the report has a positive effect, i.e really helps to solve a problem. Sometimes reporters will not respond for request for the information needed, and it is not feasible or possible to recreate it yourself. In these cases the state will be changed to invalid. With all those state changes always keep in mind the consequences. We do not want to unnecessarily mark reports invalid because of laziness. A report might contain crucial information to solve a problem, sometimes not understood to the person that triages it. Therefore, we do not close report lightly in this way. We always want to make sure the report has all the necessary information to be set for the next state. If you find that a bug actually has been fixed in a current release it would be set to fixed released however, most bugs are set automatically to this state when they are mentioned in the changelog that is uploaded with the new package ==== 4) Duplicates ==== While reporters are encouraged to first look for similar or identical problems in the bug tracker, it is inevidable that we get a lot of duplicate reports. Therefore a very important step during the information collection is to see if there is already another report. If this is the case, the report is linked to the original report more info is at https://wiki.ubuntu.com/Bugs/CommonTasks#Duplicates txwikinger: the team that can set triaged is BugControl maco: yes that is right looking for duplicates is very important in the bug triage process because it helps to connect all the information together that is needed to solve a problem, and prevents duplicate efforts ==== 5) Upstream reports: ==== This is also in particular important for KDE packages, but is very good practice in general Often we will deal with issues that are problems in upstream packages. We are working very close with the upstream distros and it is a mutual benefit for everybody to get bug fixes introduced as high upstream as possible. For Kubuntu, KDE is in particular of interest. Here is an example of this https://bugs.launchpad.net/kdebase/+bug/96151 Launchpad bug 96151 in KDE Base "kcmclock does not change to correct location" [Unknown,Fix released] In such cases you either find an already existing report in the upstream bugtracker and add it to the report, or you create a new report in the upstream bug tracker and add that one. Here are the instructions how to do this https://wiki.ubuntu.com/Bugs/HowToTriage#head-ab0eb9d7731fa877b5fc866eedc4c312dab50ee7 Basically you choose the upstream project (KDE in this case) an add the url to the particular bug in their tracker. LP will then update periodically the state of the report in the upstream tracker. ==== 6) Standard Responses ==== One thing that helps a lot, especially to maintain a polite and collaborative atmosphere are standard responses that can be adjusted to the particular situation. Here are lots of such responses for various situations: https://wiki.ubuntu.com/Bugs/Responses Usually 90% of all bugs looked at for instance bug days can be dealt with with any of those standard responses ==== 7) Support Requests ==== Sometimes bug reports turn out to be really support requests. Reporters should be gently nudged to the support tracker in launchpad. It is certainly beneficial if inexperienced users are guided by the people that help to support them to filter out all the issues that are not really bugs. It is very easy to create a bug report linked to an existing question if it turns out to be such. It is the button/link on the top right side "Convert to a question" This makes the issue available at https://answers.launchpad.net/ubuntu/ Similarily, people who answer such questions can convert a question into a bug if this should be necessary ==== 8) Bug Days ==== We have currently, weekly bug days where there is special focus on a particular class of bugs. Information can be found here: https://wiki.ubuntu.com/UbuntuBugDay are bug days always on the same day of the week? Yes currently the ubuntu Bug day is Thursdays https://wiki.ubuntu.com/UbuntuBugDay/20100708 this is the next day - tomorrow I also will as often as I get to it provide a more Kubuntu focus Bug Day on Mondays So Monday 12th should be the next one for that The bug days are also announced in different mailing lists and I believe in the UWN If there are requests for which packages need some love in this way, please feel free to contact me with it ==== 9) The IRC channel: #ubuntu-bugs ==== The main channel to find help or other folks working on bugs is the channel above We have also a Kubuntu channel at #kubuntu-bugs and there are some other channels too, for instance the German Kubuntu team has a channel at #kubuntu-de-bugs For people who like to work a little bit on bugs every day, there is a five bugs a day effort more information can be found at https://wiki.ubuntu.com/5-A-Day ==== 10) Wrap up ==== Always remember that we are working here in a team. Therefore, we help each other. It is always good to ask questions if you are not sure how to proceed. Even for the most seasoned people it can be in tricky cases very helpful to have a second opinion. So if your are not sure about something ask somebody. I am often around on the IRC channels as txwikinger or txwikinger2 (when I am at work). Feel free to see me if I can help you. Other interesting links for information: https://wiki.ubuntu.com/HelpingWithBugs https://wiki.ubuntu.com/BugSquad/KnowledgeBase https://wiki.ubuntu.com/DebuggingProcedures Kubuntu bugs can be found at https://bugs.edge.launchpad.net/~kubuntu-bugs We also have special bugs that occur in our test ppas https://bugs.edge.launchpad.net/kubuntu-ppa/ This is something we need to change our process a little to make sure that bugs get move to the correct place in these cases Anybody any questions left? apachelogger: I intend to have a Kubuntu bug Day on Monday that's a nice wall of text it was pointed out elsewhere that kernel bugs shouldn't be marked as duplicates Riddell: i updated teh wiki page Yes Riddell certain teams have slightly different policies It is always important to be in contact with the team to learn the small differences thanks a lot txwikinger that brings this Kubuntu Tutorials Day to a close txwikinger: I think this could be converted to a wiki page for future refrence thanks txwikinger this channel is always open for discussion about Kubuntu contribution of any sort