| Xenakios | looks non-native in xp? |
| RLa | a bit |
| RLa | anyway, i have set my own colors and fonts for the app so it looks now more-less same on both systems |
| tmorton | I'm trying to use qSort() to sort some QPoints. However, the order of the QPoints depends on data (variables) in my class, so my lessThan function can't be static. |
| tmorton | However, I can't seem to figure out how to pass a pointer-to-member to qSort |
| tmorton | any ideas? |
| dhrosa | tmorton: you could make a functor object |
| dhrosa | wait no |
| dhrosa | wait yes |
| Xenakios | implement operator <? |
| dhrosa | make the functor object havea MyClass member, and have implement operator() to be your comparator |
| Xenakios | ah forget it... |
| dhrosa | Xenakios's idea works too if the list isn't of pointers |
| Xenakios | if he needs to sort according to some condition inside his own class |
| tmorton | Xenakios, yeah, that's what i need |
| Xenakios | i don't think operator < would work? |
| Xenakios | that's actually also a question i've been thinking |
| tmorton | hmm |
| tmorton | that seems like it might work |
| Xenakios | sometimes it'd be useful to sort things in different ways |
| Xenakios | and not do a hack like "the < operator looks in the objects it compares for a sort mode member" |
| tmorton | hmm, do you guys see a reason why implementing operator()< wouldn't work? |
| tmorton | oh, wait |
| tmorton | i'd need to implement it in the QPoint class |
| tmorton | so yeah, that wouldn't work |
| dhrosa | yeah.... the functor object might be better in this case |
| tmorton | i'll give that a shot |
| tmorton | hmm, but how do I get the sort information from my class to the functor? |
| tmorton | can i pass a pointer into the constructor or something? |
| rohanpm | tmorton: std::mem_fun , std::bind1st |
| rohanpm | there's an example in the boost docs which should be applicable here too, http://www.boost.org/doc/libs/1_35_0/doc/html/function/tutorial.html |
| dhrosa | tmorton: if you want |
| rohanpm | just search for bind1st |
| dhrosa | your choice on hwo to imeplement it |
| tmorton | rohanpm, thanks, mem_fun looks like it might work |
| jonrafkind | whats the best way to draw a border around a widget |
| dhrosa | jonrafkind: a QFrame perhaps |
| jonrafkind | hm ok, strange that qframe doesnt let you change the color |
| Jick | I'm trying to get favicons to work in my QWebView. Right now they ALL display the same blue globe icon instead of the proper icon for each site. I read that I need to set iconDatabasePath in the QWebView's settings correctly. I have tried setting it but nothing seems to work. I even looked at the source code for the demo browser and Arora and my code is just like how it is for those two apps but its still not working. Nomatter what I try to set |
| KBHomes | So, has anybody had any success using Phonon with QNetworkAccessManager? |
| KBHomes | What I'm currently doing is on the readyRead() signal, I'm writing to a QBuffer |
| KBHomes | And on the first readyRead() I'm emitting a signal that has the QBuffer in the parameter |
| KBHomes | And the main window picks up the signal and does mediaObject->setCurrentSource(buffer); and then mediaObject->play(); |
| KBHomes | But it doesn't seem to do anything |
| KBHomes | Moreover the stateChanged() signal of MediaObject isn't emitted |
| machtfuernacht | Hi |
| dhrosa | hi |
| machtfuernacht | I try building qtoctave on Windows and I have some problems with libQtUiTools.a |
| machtfuernacht | http://pastebin.com/xUwrQq3h |
| machtfuernacht | nm says, that libQtUiTools.a has no danymic symbols. I think that this is the problem. But I have no idea how to fix it. |
|
|
| JamesAstro | I can't seem to compile any of the examples that ship out with qt4 for windows but i can compile my own projects fine. I used the installer so id on't know what could have gone wrong. Any one know what might cause this? |
| marloshouse | JamesAstro: how are you compiling, from command line or from the qtcreator? |
| JamesAstro | qtcreator |
| marloshouse | what error are you getting |
| JamesAstro | shoot. i didn't copy it down and it is uninstalling so i can reinstall it |
| JamesAstro | it'll be a sec |
| KBHomes | Strange, if I wait for the entire download to finish, and then play it from the buffer, it works then. |
| KBHomes | But not before it's finished. |
| machtfuernacht | Anyone an idea for ma UiTools.a problem? |
| dhrosa | machtfuernacht: that's not the problem |
| rohanpm | machtfuernacht: libQtUiTools.a is not _supposed_ to have dynamic symbols |
| rohanpm | .a files are static libraries |
| rohanpm | machtfuernacht: libQtCore4.a should provide _imp___ZN7QObject16staticMetaObjectE , can you check for that? |
| rohanpm | don't give the -D option to nm |
| machtfuernacht | yes there it is |
| machtfuernacht | k I had to reorder the libraries. |
| machtfuernacht | seems to compile now. |
| shadewind | if I run a member function using QtConcurrent::run(), is it legal to emit a signal from this member function? |
| JamesAstro | For some reason Qt is picking up visual studio libraries as a lib path. how do i remove this? |
| JamesAstro | using QtCreator |
| JodaZ | hmm, i am having a problem here, qt is rendering characters of the fallback font in a different size than the normal ones |
| machtfuernacht | Is it possible to get a list of the dlls that the program needs? |
| JodaZ | various |
| dhrosa | machtfuernacht: ldd on linux |
| dhrosa | ldd might work on OS X, there's also otool for OS X |
| dhrosa | dependency walker on windows |
| JodaZ | the problem is with dynamic linking |
| machtfuernacht | thx dhrosa dependency walker did it |
| JamesAstro | does any one know how to not allow qt from including from vc++ include folder? |
| JamesAstro | it is causing problems with compiling only the example projects |
| JamesAstro | any one? |
| rohanpm | JamesAstro: are you sure qt is introducing the dependency? |
| rohanpm | wouldn't surprise me if the MSVC compiler is automatically adding these directories to the include path |
| JamesAstro | hmm i suppose there was simple and wiered fix to it |
| JamesAstro | i had to clean the build files and rebuild them |
| JamesAstro | that fixed it |
| zeke | how can I prevent an user from right clicking on the main window and closing my docks and toolbars? |
| zeke | except for certain toolbars |
| elfMobile | does QT have a widget like this? http://www.adobe.com/products/photoshoplightroom/images/volume_management_325x200.jpg |
| zeke | elfMobile: I think you have to make your own |
| elfMobile | zeke, I'm not talking about look / feel |
| elfMobile | I don't know what you'd call those things, expandable regions I guess... there is nothing like that in Qt? |
| special | progressive disclosure is the technical name |
| special | nothing built into Qt, but it would be easy to create |
| zeke | I think there is something like that in KDE or it's a created one because I see it in KDevelop |
| special | the functionality of it is trivial, the only hard part is deciding how it looks |
| zeke | blah I really hope this bug gets done: http://bugreports.qt.nokia.com/browse/QTBUG-9615 |
| special | heh |
| zeke | well I'm trying to implement my own. My implementation is good, just i need those notifications else I'll have to reimplement all of it myself |
| zeke | or completely just start over from scratch again |
| special | could always write it yourself and merge request |
| zeke | that's what I'm doing right now ;) |
| special | ah |
| zeke | well for my application ;) |
| zeke | well see the problem is, it was requested so much from what I've seen, they just kept push it to the next release and then just denying it |
| Xenakios | ouch...i didn't realize dockwidgets have those limitations >_< |
| zeke | Xenakios: yeah they do |
| Xenakios | i hope i won't bump into those anyday soon |
| zeke | I didn't notice them until I needed them |
| special | dockwiget is pretty limited and not very attractive with most styles |
| special | it does need some love |
| JamesAstro | why use threads when yo ucan use qtConcurrent? what is the down side? |
| special | JamesAstro: threads are lower level |
| special | you get far more control over what happens and how |
| special | and sometimes the concurrent API can be clunky |
| special | all depends on what you're doing |
| Xenakios | QtConcurrent is hard with stuff like progress notifications, cancelling. not very suitable for backround tasks that should always be running |
| zeke | Xenakios: special: here is my video of my docks. http://www.akiirc.org/aki_newshell.ogv |
| zeke | I fixed the bugs in that video ;) |
| Xenakios | in other words, QtConcurrent is suitable for tasks that run and end quickly, with no need for progress reporting/cancelling |
| zeke | but knowing, my bug report will probably get pushed for next release like 3 times then forgotten about |
| JamesAstro | ohh i c. Well my situation is this: i am working on a Gui based server and what happens is that a client connects and sends a string and then disconnects. But there are many clients, so i was wondering if i should call a QtConcurrent for every new client. |
| special | no |
| special | you don't need a thread per socket, in the vast majority of server situations |
| JamesAstro | yah? |
| JamesAstro | so single thread it? |
| special | Qt's sockets are designed to be used asynchronously |
| Xenakios | zeke: damn...autohiding docks...yeah...those would be useful...or neat...or something |
| Xenakios | it's like something that would be "nice" to have but too much pain to implement from scratch :P |
| JamesAstro | special: but what happens is that i need to update the GUI based ont eh information recieved by the client |
| JamesAstro | hmm |
| special | if there is no expensive computation required on your information, you can even run it all out of the main thread |
| special | if not, one thread for sockets and one for GUI |
| zeke | Xenakios: what you like how I did it so far? |
| special | beware of threading issues. |
| JamesAstro | ic |
| Xenakios | zeke: i guess it's ok ;) |
| JamesAstro | thanks :-) this makes me fool lighter |
| special | but one per socket is a waste of resources |
| JamesAstro | *fell |
| JamesAstro | *feel :p Thanks alot |
| zeke | Xenakios: maybe if I ever get mine finish, I will attempt at cloning a Qt branch and try adding it to Qt itself. But I have no guarentees I will understand Qt's code ;P |
| zeke | not fond of qmake |
| zeke | :P |
| zeke | but more than likely it'd get accept in KDE before Qt |
| zeke | which my app is based on KDE :P |
| Xenakios | :-/ |
| zeke | what |
| Xenakios | well i don't use KDE :P |
| zeke | i do, and KDE helps alot where Qt alone doesn't |
| vector_xyz | I am using Qt Webkit to display Images it all works well but some images that are giant take time to load even tho they all are on the local filesystem... |
| vector_xyz | is there a way to preload an image in C++ via QPixmap or so and then pass that to Webkit |
| vector_xyz | to display it inside <img src... /> |
| Xenakios | why do you think it's the loading step that's slow? |
| Xenakios | perhaps webkit just is slow to display images? |
| vector_xyz | how do i improve it :) to be super-fast :) |
| vector_xyz | especially if an image is on local file system |
| guest356876 | qtwebkit doesn't seem to support .ico files by default. is there any way to make it support them? like maybe a plugin or something? although I'm not sure how plugins work or anything. |
| zeke | ico images are horrible |
| zeke | you can make a qtwebkit plugin |
| guest356876 | the only reason I need them is because I have a qwebview that has a list of websites and I want to display the favicon of each website next to each site. since everyone does favicons in .ico format I need to be able to display them. |
| guest356876 | so how exactly do qtwebkit plugins work? how would I make a plugin for .ico support? |
| JamesAstro | does qt provide a mechinism to issue system calls and return the output? without manually writing and reading from the filesystem? |
| Xenakios | uh system calls? like calling the OS native API from code? |
| Xenakios | there's nothing in Qt stopping you to do that |
| Xenakios | just need #ifdefs or something for crossplatform heh |
| Xenakios | on the other hand if you mean start up another process, and wait for it to finish or produce some output, then QProcess |
| rohanpm | JamesAstro: huh? what kind of mechanism do you need Qt to provide for that? |
| tyfon | http://doc.trolltech.com/4.6/qprocess.html |
| tyfon | i think he's thinking about something like that |
| rohanpm | JamesAstro: ok, "system call" has a special meaning that you might not have been aware of |
| rohanpm | http://en.wikipedia.org/wiki/System_call |
| zeke | how can I prevent an user from right clicking on the main window and closing my docks and toolbars? |
| zeke | except for specific ones |
| Xenakios | tell them to apply superglue to their right mouse button :P |
| Xenakios | or buy a Mac...heheheheheheh |
| JamesAstro | yes sorry my mistake for not being clear i was talking about some kind of wrapper for System() function |
| Action: zeke slaps Xenakios |
| zeke | wow I never knew about QList::value() |
| zeke | anyone remember the function to get the widget the the current cursor position? |
| zeke | at the* |
| JamesAstro | nop |
| special | zeke: QCursor has the position, and you can use QApplication::widgetAt |
| JamesAstro | The wieredst thing is happening to me. I have a class declared and implemented. I have a new instance of it and QtCreator recognises that it is a lagit type but during compile it says that it hasn't been declared in t his scope? what is going on i have it included |
| zeke | special: thats it thank you |
| Nazzy | hi, I want to use QTestLib to test a C shared object library... anyone know where I can info relating to this? |
| Nazzy | or is it going to work straight out? |
| zeke | !rtfm QTestList |
| qtassistant | zeke: Qt 4.6: QTextList Class Reference - http://doc.qt.nokia.com/qtextlist.html |
| zeke | !rtfm QTestLib |
| qtassistant | zeke: Qt 4.6: QTestLib Manual - qtestlib - http://doc.qt.nokia.com/qtestlib-manual.html#qtestlib |
| zeke | Nazzy: ^^ |
| zeke | read that |
| zeke | Nazzy: will you be using it only for that single C library and not for a Qt application? |
| Nazzy | yup |
| Nazzy | bit of a waste, I know |
| zeke | Nazzy: you might want to check cpptest or cmake's test |
| zeke | if you are not using it for a Qt application (waste of dependency and what not |
| Nazzy | true, though integration with kdev4 seemed a nice point |
| ToArtist | hi,who knows callingallinnovators??? |
Popular searches: