=== wgrant_ is now known as wgrant === chihchun is now known as chihchun_afk [11:32] mzanetti: ping [12:00] nik90: pong [12:08] mzanetti: hey I am hitting a weird issue with our base timezone model [12:08] mzanetti: I created a C++ plugin just to send back the local date and time using QDateTime since it keeps track of the timezone change unlike the javascript date object. [12:09] mzanetti: Everything seems to work except for one thing which is the localCityTime.offsetFromUtc() - worldCityTime.offsetFromUtc() value. We return this value in the timezone base model class. On changing the system timezone and then returning to the clock app, I notice that this value changes in the c++ side of things, however it doesn't update the value in [12:09] the qml listview. [12:09] mzanetti: any thoughts as to why that might happen? [12:09] mzanetti: I am working on this at https://code.launchpad.net/~nik90/ubuntu-clock-app/implement-change-time-settings [12:09] nik90: isn't that the same issue again? [12:10] that returning QDateTime to qml doesn't keep timezone informations [12:10] mzanetti: no because the localCityTime.offsetFromUtc() - worldCityTime.offsetFromUtc() value is a int64 value. On c++ when qDebug() it returns the correct value, however on qml that value is different [12:10] mzanetti: so I am not interacting with qDateTime but rather just an int [12:11] hmm, ok... need to check the code [12:12] mzanetti: in the timer update() function, we only do this roles << RoleTimeString; [12:12] mzanetti: may be we need to add other stuff that also change like the RoleTimeTo, RoleDayTo [12:12] nik90: ah, yeah, true, you need to add each role you change [12:13] mzanetti: do I do it like roles << RoleTimeString << RoleTimeTo; ? [12:13] yep [12:13] thnx [12:14] nik90: if you're changing all of the roles, or most of them, you could remove the whole last argument in dataChanged, then it would always update all roles [12:14] its up to you to decide if you can affort refreshing also unchanged fields or not [12:15] I am changing 3 out of 6, so I will do roles << RoleTimeString << RoleTimeTo to save on performance [12:16] mzanetti: yay that worked [12:16] :) [14:54] hi guys [14:59] does some one know how to make MYSQL database conection with QML?? [15:19] does some one know how to make MYSQL database conection with QML?? [15:33] Diogo: Check out http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html [16:08] nike90: i have c++ code, but i just dont understand it [16:25] Hi all [16:26] Which component should I use instead of standard WebView in UP? [16:35] Diogo: I always wonder you change nik90 to nike90 :D...I don't get a notification if you type nike90 [16:36] nik90: ok [16:37] Diogo: I am not sure about accessing sql in c++, i haven't done it before [16:37] nik90: i have a project with some code [16:37] Diogo: but I am sure QT should have that in some form or the other [16:38] nik90 Hello) Can you please help me with using of "Ubuntu.Web" on desktop? [16:38] nik90: the question is, that i dont understand the code [16:38] nik90: look http://paste.ubuntu.com/7876122/ [16:38] qtros: Hi [16:39] nik90: http://paste.ubuntu.com/7876128/ [16:40] nik90: i just needed some one to explain me what the code means, so i could move on and modify the way i need him [16:40] qtros: I am guessing you have looked at http://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Web/ [16:40] qtros: I haven't used it yet, so sry I don't know much about it [16:40] nik90 yep [16:40] Diogo: ah ok, [16:40] * nik90 takes a look [16:41] nik90 hmm... standard WebView is deprecated and nobody knows how to use new :D [16:41] qtros: yeah, however the documentation at http://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Web/ seems quite limited. I would love to see some examples there :/ [16:42] Diogo: ok so your code creates a mysql object in c++. Do you want to access the mysql object in c++ or in qml? [16:43] Diogo: If you want to do all the sql commands in qml, it is better to look at the link I pasted earlier [16:43] Diogo: on the other hand, if you want to use it in your c++ code, it seems ok [16:44] Diogo: you will still need to add some functions for additonal functionality [16:45] nik90: i dont understand c++ thats why i asked help [16:45] Diogo and what do you want to do with this code? [16:46] Diogo: as qtros where do you want to use this code? In qml or c++ ? [16:46] nik90: i've found out that the only possible way you can make the mysql contection in qml is using c++ [16:46] qml [16:46] nik90: qml [16:46] Diogo: ok then check out http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html [16:46] Diogo: that is sql in qml [16:46] nik90: i've found out that the only possible way you can make the mysql contection in qml is using c++ [16:46] ^^ that is plain wrong [16:47] nik90: is it?? [16:47] yes [16:47] nik90: javascript cant make the conection [16:47] Diogo: Did you read http://qt-project.org/doc/qt-5/qtquick-localstorage-qmlmodule.html ? [16:48] nik90:i'm going to read it [16:48] Diogo: they are using javascript to make the connection [16:49] nik90: they are using sqlite [16:49] nik90: imagin you have an app that requires you to do the login [16:50] nik90: and the database with you data is on the server [16:51] nik90: what type of DB woudl you use? [16:51] Diogo yes, remote connection only with cpp [16:51] Diogo: then I would use MySQL since it is in a remote server [16:51] Diogo: you didn't specify the remote server part earlier :) [16:51] nik90: sorry [16:52] nik90: about that [16:52] Diogo: In that case, you will have to create a C++ plugin that you can import in your qml code. [16:52] Diogo: However you will need to also set up cmakelists to ensure that the c++ gets built rproperly when running your app [16:53] nik90: i have a huge problem now [16:53] Diogo: In Qtcreator, in the create project wizard, you will have to choose "App with QML Extension Library" [16:54] nik90: because i dont know how to program in c++ [16:54] Diogo: you will have to learn I am afraid [16:55] Diogo: I was in the same boat 2-3 weeks ago where I had to develop C++ plugins for the clock app. [16:55] Diogo: I did some reading and eventually am getting used to it [16:55] nik90: any good pleaces to learn it? [16:56] Diogo: well if you want to learn C++, then http://www.learncpp.com/ should be good [16:56] Diogo: however after that you will have to know how to develop with Qt C++ [16:57] nik90: and did you see the voidream tutorials?? [16:57] Diogo: ? [16:57] Diogo: I knew a bit of c++ from high school, so I started to work straight on the Qt C++ part [16:58] nik90: look https://www.youtube.com/watch?v=6KtOzh0StTc&list=PL2D1942A4688E9D63 [16:59] Diogo: ooh yes, I saw some of his videos [17:01] nik90: i've created the "App with QML Extension Library" to see the files [17:01] and i see the backed.cpp [17:01] backend.cpp [17:02] nik90: and i see the backed.cpp in Myapp folder [17:02] nik90: etc.. [17:02] yup [17:03] so basically the backend folder holds your c++ plugin stuff [17:03] while your main qml code is in the app folder [17:03] nik90: the new thing for me to is now the app folder and the .. folder [17:03] Diogo: dont worry about the .. folder. It is part of cmake [17:03] nik90: what is cmake? [17:04] Diogo: it is sort of like an instruction list which tells the compiler what to do before running your app [17:06] nik90: so i'll develope my c++ plugins in the Myapp folder right? [17:07] Diogo: there should be already a sample C++ plugin class [17:07] Diogo: you can just change that with your own class [17:08] nik90: so i'll change mytype.cpp and mytype.h for that right? [17:09] Diogo: yeah [17:10] nik90: you are the best man [17:10] nik90: for a hole day i've asked on forms and no one did say anything [17:12] nik90: and now when i ask to the community of the OS i love so muhc they help me [17:12] Diogo: make sure you accordingly change the CMakeList.txt file when you rename the mytype.cpp or mytype.h files [17:12] Diogo: no worries [17:13] Diogo: just push this to your github or launchpad branch and then we can better help with debugging [17:15] nik90: i'm going to study c++ for a day or 2 and then i'll begin to put everything in github [17:15] ok [17:18] nik90: and then i'll tell you :) [17:18] nik90: thanks for everything :D [17:19] Diogo: yw [17:37] Hi all [17:37] Can someone tell how to use QML package "Ubuntu.Web" on desktop? [17:54] Can someone tell how to use QML package "Ubuntu.Web" on desktop [19:47] qtros: http://developer.ubuntu.com/api/qml/sdk-14.10/Ubuntu.Web.WebView/ [19:47] qtros: you probably need to be running Utopic on the desktop to use it though [19:48] qtros: also make sure you have qtdeclarative5-ubuntu-web-plugin installed [19:50] hope that helps, /me is going afk for a bit === commandoline_ is now known as commandoline === daker_ is now known as daker === commandoline is now known as Guest80539 [20:29] mhall119 ping [20:58] qtros: pong [20:59] mhall119 "you probably need to be running Utopic on the desktop to use it though" - does it mean that I always must develop for UP only on latest version of Ubuntu? ... [20:59] mhall119 what if I prefer stable releases? [21:00] qtros: once we have phones on the market there will be a stable release, right now "stable" (Trusty) is missing some many needed features that you'd be hurting yourself to target it [21:01] I don't know if anybody even still runs it on a phone [21:01] mhall119 no no, I mean desktop version of Ubuntu) [21:01] if you're only interested in targeting desktops, then there's a case to be made for using only the sdk-14.04 framework, but Ubuntu.Web isn't in it [21:01] qtros: you can run the stable desktop version and target Utopic in an emulator [21:02] that's still not 100% smooth, but it works [21:02] mhall119 but if I interested to target both, I should use 14.10 for now? [21:02] my "not smooth" I mean QtCreator won't recognize the newer API elements, so some of the help if offers won't work [21:02] qtros: if you use the sdk-14.10 framework, you'll only be able to target utopic and future releases, not trusty [21:03] that goes for phone and desktop [21:04] mhall119 I just want to write apps for UP and have ability to test them on desktop like before) [21:09] mhall119 is it possible on Utopic?) [21:12] only if you have Utopic on the desktop [21:12] if you have trusty on the desktop, you can only run your app locally if it's using the sdk-14.04 framework APIs [21:15] basically sdk-14.04 means "Trusty and above", sdk-14.10 means "Utopic and above" [21:15] so you can use an sdk-14.04 app in Utopic, but not an sdk-14.10 app in Trusty