Re: [Interest] QHash memory management
Yes, you do need to delete them. You can keep them as scoped_ptr instead of raw pointer. On Aug 5, 2014 5:10 PM, Jason R. Kretzer ja...@gocodigo.com wrote: Just a quick question about using QHash with pointers. Lets say I have the following snippet: //=== QWebView *view; QHashint, QWebView * hash; for(int i=0; i10; i++) { view = new QWebView(this); hash.insert(i, view); } go do something meaningful //or do a hash.clear(); for(int j=0; j10; j++) { hash.remove(j); } //=== After the remove or clear is called, do I still need to delete the pointers? If so, would I just iterate through them using the value function and delete them one by one? -Jason -- //---// Jason R. Kretzer Lead Application Developer ja...@gocodigo.com C:606.792.0079 H:606.297.2551 //---// ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] How to disable session management.
Did you tried Display=:99.0 ? On Mon, Apr 22, 2013 at 7:45 AM, Bill Crocker william.croc...@analog.comwrote: On 04/22/2013 07:43 AM, Bill Crocker wrote: On 04/22/2013 07:19 AM, Bo Thorsen wrote: Hi Bill, Den 22-04-2013 12:27, Bill Crocker skrev: I am running my Qt app with a virtual X server on a compute farm as part of regression testing. Those instances still appear to want to work with the session manager on my login host. This fails and the following messages appear. _IceTransSocketUNIXConnect: Cannot connect to non-local host juno.adsdesign.analog.com Qt: Session management error: Could not open network socket How to disable session management under these circumstances? pkill -f Xvfb :30 Xvfb :30 -ac run_my_qt_app -display :30 pkill -f Xvfb :30 I'm not completely sure about this, because it's ages ago that I did something similar. You should probably unset the DISPLAY variable for the Xvfb run, so it doesn't know about your own display. I got it (from a web search). One solution is to unset the SESSION_MANAGER env variable. So, while it still leaves something to be desired, the following works. unsetenv DISPLAY unsetenv SESSION_MANAGER pkill -f Xvfb :30 Xvfb :30 -ac run_my_qt_app -display :30 pkill -f Xvfb :30 Bill ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QXcbConnection error
This seems like an issue with your graphics card or probably not correct driver installed. Google for more (for ex: http://askubuntu.com/questions/67567/extension-glx-missing-on-display) On Mon, Apr 22, 2013 at 12:10 AM, Ramakanthreddy_Kesireddy ramakanthreddy_kesire...@mahindrasatyam.com wrote: Dear Thiago, Now XServer is running. The platform plugin being used is Xcb. However, when I run qt application, it throws below error: Xlib: extension GLX missing on display :0. Couldnot Initialize glx Aborted. Please let me know if there is a workaround or patch in Qt? Thanks and Regards, Ramakanth From: interest-bounces+ramakanthreddy_kesireddy= mahindrasatyam@qt-project.org[interest-bounces+ramakanthreddy_kesireddy= mahindrasatyam@qt-project.org] on behalf of Thiago Macieira [ thiago.macie...@intel.com] Sent: Sunday, April 21, 2013 7:30 PM To: interest@qt-project.org Subject: Re: [Interest] QXcbConnection error On domingo, 21 de abril de 2013 10.38.36, Ramakanthreddy_Kesireddy wrote: Could you please let me know how can we verify if XServer is running or not? Sorry, that's not really a Qt question. Please look at your system's configuration settings, boot scripts, etc. and check whether you started the X server. Or you can just look at the process list (ps ax) and see if X is running. If X is not running, start it. Please consult your Linux distribution's documentation or manuals to know how to do it. If X is not supposed to be used, then tell us. And tell us which Qt graphical backend you were expecting to use. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center DISCLAIMER: This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Rotating objects in QML are killing performance
Hi, I checked your code with QtQuick 1.1 (which is what I have as of now) and it seems to be working perfectly fine. I ran 10 instance of application. The logic seems correct in your code. On Thu, Apr 11, 2013 at 11:31 AM, Michael Andersen mich...@steelcode.comwrote: Hi list, I have a loading throbber in my application that is completely killing the performance. If it is rotating then the application does not repaint while it is being dragged and if more than two or three copies of the application are running then it starts lagging Unity. I'm on Ubuntu 12.04 with Qt 5.0.1 64-bit. I was going to wait until 5.2 was out and check again, but it's taking a little longer than I expected for a stable version to be released. Here is a simple reproducer of the problem, I create a QtQuick2 application in Qt Creator 2.7. I adjust the QML to look like this: import QtQuick 2.0 Rectangle { width: 400 height: 400 Rectangle { id: redsquare color: red width: 50 height: 50 x: 50 y: 50 } RotationAnimation { loops: Animation.Infinite target: redsquare properties: rotation from: 0 to: 360 duration: 300*5 direction: RotationAnimation.Clockwise running: true } } My main.cpp is the default, but that looks like this: #include QtGui/QGuiApplication #include qtquick2applicationviewer.h int main(int argc, char *argv[]) { QGuiApplication app(argc, argv); QtQuick2ApplicationViewer viewer; viewer.setMainQmlFile(QStringLiteral(qml/SimpleRotator/main.qml)); viewer.showExpanded(); return app.exec(); } I am new to Qt, so perhaps I am doing something wrong with my animation, but I have tried a couple other methods of animating and they all lag equally badly. The PC I develop on is quite a monster, so if it is lagging on this, I hate to think what it's going to do on my clients' laptops. Anyone have any ideas? Regards Michael ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Default delegate with QTableView and QSqlTableModel
You may be able to use QIntValidator for that particular column, by default Qt delegate will show everything as lineedit where you can put anything. If you want to show QSpinBox you need to tell that for xyz column QSpinBox Widget should open.. On Wed, Mar 27, 2013 at 2:46 PM, Tr3wory t...@freemail.hu wrote: Another piece of information: the model-data(...) returns a QVariant::LongLong... tr3w On Wed, Mar 27, 2013 at 8:32 PM, Tr3wory t...@freemail.hu wrote: Hi all, I have a QTableView and a connected QSqlTableModel. The database is an SQLite database with two columns, the types are TEXT and INTEGER. Everything is works as expected, except I don't get QSpinbox as a editor for the INTEGER column, so I can write there anything, and since the SQLite can store TEXT in an INTEGER column, I don't even get an error... So what can I do? Can I set the type (QVarinat::Int) of the column somehow (in the model or in the view)? If I use setItemDelegateForColumn on the view manually, can I use a ready made delegate somehow or the only possible solution is to create a SpinBoxDelegate for myself? Cheers, tr3w ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Default delegate with QTableView and QSqlTableModel
This might help you -- http://qt-project.org/doc/qt-4.8/itemviews-spinboxdelegate.html On Wed, Mar 27, 2013 at 3:01 PM, preeteesh kakkar preeteesh.kak...@gmail.com wrote: You may be able to use QIntValidator for that particular column, by default Qt delegate will show everything as lineedit where you can put anything. If you want to show QSpinBox you need to tell that for xyz column QSpinBox Widget should open.. On Wed, Mar 27, 2013 at 2:46 PM, Tr3wory t...@freemail.hu wrote: Another piece of information: the model-data(...) returns a QVariant::LongLong... tr3w On Wed, Mar 27, 2013 at 8:32 PM, Tr3wory t...@freemail.hu wrote: Hi all, I have a QTableView and a connected QSqlTableModel. The database is an SQLite database with two columns, the types are TEXT and INTEGER. Everything is works as expected, except I don't get QSpinbox as a editor for the INTEGER column, so I can write there anything, and since the SQLite can store TEXT in an INTEGER column, I don't even get an error... So what can I do? Can I set the type (QVarinat::Int) of the column somehow (in the model or in the view)? If I use setItemDelegateForColumn on the view manually, can I use a ready made delegate somehow or the only possible solution is to create a SpinBoxDelegate for myself? Cheers, tr3w ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest