[Interest] pySide for QT5
Hi, When pySide for QT5 will be available? -- Sergey ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] view examples\declarative\cppextensions\qwidgets\qwidgets.qml using pySide or PyQt4
In this example descendant of QtDeclarative.QDeclarativeItemis created in python code. My question is about using in PySide/PyQT QML a widget, located in dll file, created by compiling C++ QT code. Is it possible? 02.05.2013 4:26, cckwes wrote: Hi, I think you need to expose you QWidget to QML using qmlRegisterType(). You can refer to this post on how to do it. :) http://qt-project.org/forums/viewthread/7616 Regards, Wesley On Thu, May 2, 2013 at 1:42 AM, Sergey sh0...@gmail.com mailto:sh0...@gmail.com wrote: Hi, I've downloaded and installed ftp://ftp.qt.nokia.com/qt/source/qt-win-opensource-4.8.1-vs2008.exe examples\declarative\cppextensions\qwidgets\ is working well: D:\QT\4.8.1\bin\qmlviewer.exe qwidgets.qml But I can not make it working in pySide or PyQt4. I use http://releases.qt-project.org/pyside/PySide-1.1.2.win32-py2.7.exe This is python script: --- import sys import os from PySide import QtCore, QtGui, QtDeclarative basedir = os.path.dirname(os.path.realpath(__file__)) app = QtGui.QApplication(sys.argv) view = QtDeclarative.QDeclarativeView() view.setSource(QtCore.QUrl(basedir + '/' + sys.argv[1])) view.setResizeMode(QtDeclarative.QDeclarativeView.SizeRootObjectToView) ##view.setWindowIcon(QtGui.QIcon(basedir + '/icon.ico')) view.setWindowTitle('Simple Data') w=800 h=600 sw=QtGui.QApplication.desktop().screen().rect().width() sh=QtGui.QApplication.desktop().screen().rect().height() view.setGeometry((sw-w)/2, (sh-h)/2, w, h) view.show() sys.exit(app.exec_()) --- gives error: D:\QT\4.8.1\examples\declarative\cppextensions\qwidgets/qwidgets.qml:42:1: import QWidgets has no qmldir and no namespace Same problem if use PyQt4. Is it possible to embed QWidget-based objects into QML in pySide or PyQT4? -- Regards, Sergey ___ Interest mailing list Interest@qt-project.org mailto:Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- Wesley Chong Email: cck...@gmail.com mailto:cck...@gmail.com Blog: http://blog.linux4us.org ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QML combobox in ListView delagate
Hi, I'm trying to use combobox from this post in my ListView item delagate: http://qt-project.org/forums/viewthread/9275 Drop-down menu is displayed under listview rows, which are below current. If scroll listview in upper direction, z-order or rows changes, and drop down menu becomes over below rows. Is there a way to tell QML engine to display drop down menu over all ListView rows in any case? -- Sergey ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] view examples\declarative\cppextensions\qwidgets\qwidgets.qml using pySide or PyQt4
Hi, I've downloaded and installed ftp://ftp.qt.nokia.com/qt/source/qt-win-opensource-4.8.1-vs2008.exe examples\declarative\cppextensions\qwidgets\ is working well: D:\QT\4.8.1\bin\qmlviewer.exe qwidgets.qml But I can not make it working in pySide or PyQt4. I use http://releases.qt-project.org/pyside/PySide-1.1.2.win32-py2.7.exe This is python script: --- import sys import os from PySide import QtCore, QtGui, QtDeclarative basedir = os.path.dirname(os.path.realpath(__file__)) app = QtGui.QApplication(sys.argv) view = QtDeclarative.QDeclarativeView() view.setSource(QtCore.QUrl(basedir + '/' + sys.argv[1])) view.setResizeMode(QtDeclarative.QDeclarativeView.SizeRootObjectToView) ##view.setWindowIcon(QtGui.QIcon(basedir + '/icon.ico')) view.setWindowTitle('Simple Data') w=800 h=600 sw=QtGui.QApplication.desktop().screen().rect().width() sh=QtGui.QApplication.desktop().screen().rect().height() view.setGeometry((sw-w)/2, (sh-h)/2, w, h) view.show() sys.exit(app.exec_()) --- gives error: D:\QT\4.8.1\examples\declarative\cppextensions\qwidgets/qwidgets.qml:42:1: import QWidgets has no qmldir and no namespace Same problem if use PyQt4. Is it possible to embed QWidget-based objects into QML in pySide or PyQT4? -- Regards, Sergey ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Excel-like grid of numbers in QML
Hi, Is it possible to create Excel-like grid with numbers using QML? So that it would be possible to hide/show rows, recount values, put checkboxes in some cells? Any information, hints, urls would be a help. -- Regards, Sergey ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Qwt and upgrading to Qt 5
Hello Frank! My ex-colleagues asked me to help port qt4.7/qwt5 based app to qt5/qwt6.1 and I faced some problems. Some of them not fully solved yet. Some issues were connected with deprecated methods in qt 5 (like QString::toAscii) that I've used in my app, some issues were about missing (renamed?) slots in qwt objects. Also I found that copy constructor of QwtPlotCurve was removed for reasons unknown for me (but I believe there was strong reasons for removing it), and that required to create default curve and copy styles from existing curve to achieve effect I wanted. All of these issues seems not to be really hard to resolve, but it's better to be ready to spend some time for successful migration to new version of these beautiful libraries. Good luck! -- with best regards, Sergey P. phone: +380687507707 skype: uazure jabber: az...@jabber.com.ua ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] CSS with QML
Hi, Is it possible to add CSS file to QML in QT? -- Regards, Sergey ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] MacOS 10.4 + QT 4.7.4 + my app linking error
Hello, I built QT 4.7.4 on MacOS 10.4 Tiger. When I build my app, I get this error while linking: /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: for architecture i386 /usr/libexec/gcc/i686-apple-darwin8/4.0.1/ld: Undefined symbols: _CFDataGetBytePtr _CFDataGetLength _CFDataGetTypeID _CFGetTypeID ___CFConstantStringClassReference _FrontWindow _GetCurrentProcess _SelectWindow _SetFrontProcess _ShowWindow _deflate _deflateEnd _deflateInit2_ _deflateInit_ _inflate _inflateEnd _inflateInit2_ _inflateInit_ _zError _zlibVersion collect2: ld returned 1 exit status Where these symbols must be defined and how to add them to linking process? -- Thanks! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] MacOS 10.4 + QT 4.7.4 + my app linking error
List of non-found by linker functions became less after linking with zlib. But these functions are still not found: _CFDataGetBytePtr _CFDataGetLength _CFDataGetTypeID _CFGetTypeID ___CFConstantStringClassReference _FrontWindow _GetCurrentProcess _SelectWindow _SetFrontProcess _ShowWindow What must I link additionally to find them? 27.11.2012 17:16, Konstantin Tokarev wrote: 27.11.2012, 17:15, Sergey sh0...@gmail.com: I didn't link with zlib at all. I solved problem adding this line to the pro file: include(...qt/4.7.4/qt-everywhere-opensource-src-4.7.4/src/3rdparty/zlib_dependency.pri) Use -lz instead. Works for any Unix-like OS including Mac. ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] explore contents of built in qmake variables
Hi, is there a way to find out total contents of QT_CONFIG, CONFIG qmake variables? Are they arrays? Can I somehow print their contents? I know how to test, if config contains something, for example: contains(QT_CONFIG, system-zlib) : message(system-zlib) But how to print ALL CONTENTS of QT_CONFIG? -- Thanks! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] debug QtService
Hello, all I'm developing windows web service using QtService. To debug it, I launch program in VS2005 debugger with -e argument. It starts in console mode and handles requests. How can I emulate stopping the service, so that all code, which is working usually when windows stops the service? I want to make web service method, requesing which I would tell service to stop. void RequestMapper::service(HttpRequest request, HttpResponse response) { QByteArray path=request.getPath(); #ifdef _DEBUG if (path.startsWith(/stop)) { //QCoreApplication::instance()-exit(); // this leads to error in HttpConnectionHandler::run() in line: moveToThread(QCoreApplication::instance()-thread()); How to emulate stopping the service here, so that program, running with -e argument would stop normally, as it stops when running as windows service? } #endif } Thanks! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Heavily Commented Example: Simple Single Frontend with Two Backends
I did some googling and found this http://lists.qt.nokia.com/pipermail/qt4-feedback/2009-October/000880.html - you are saying that it's ok to use volatile on x86_64 here since there is no actual synchronization here. Or am I missing something here and cases are different? Sorry for nitpicking, I am just trying to fully understand what's happening in this case On Tue, Oct 23, 2012 at 10:24 PM, Thiago Macieira thiago.macie...@intel.com wrote: On terça-feira, 23 de outubro de 2012 12.14.37, Till Oliver Knoll wrote: - Use QAtomicInt instead of a volatile bool (for the simple Stop thread use case) or The problems with volatile bool: 1) volatile wasn't designed for threading. It was designed for memory-mapped I/O. Its purpose is to make sure that there are no more and no fewer reads from the variable and writes to it than what the code does. If I write: a = 1; a = 1; I want the compiler to store 1 twice. If this is MMIO, then I might need that value of 0x01 sent twice over my I/O device. For threading, however, that's irrelevant. Storing the same value twice, especially sequentially like that, makes no sense. I won't bother explaining why because you can see it with little thought. What's more, CPU architectures don't work like that either. Writes are cached and then sent to the main RAM and other CPUs later, in bursts. Writing twice to memory, especially sequentially, will almost certainly result in RAM being written to only once. And besides, there's no way to detect that a location in memory has been overwritten with the same value. For those reasons, the semantics of volatile don't match the needs of threading. 2) volatile isn't atomic. a) for all types All CPU architectures I know of have at least one size that they can read and write in a single operation. It's the machine word, which usually corresponds to the register size. Complex and modern CPUs are often able to read and write data types of different sizes in atomic operations, but there are many examples of CPUs that can't do it. The only way to store an 8-bit value is to load the entire word where that 8-bit value is located, merge it in and then store the full word. A read-modify-write sequence is definitely not an atomic store. The C++ bool type is 1 byte in size, so it suffers from this problem. So here we have a conclusion: you'd never use volatile bool, you'd use volatile sig_atomic_t (a type that is required by POSIX to have atomic loads and stores). b) for all operations Even if you follow the POSIX recommendations and use a sig_atomic_t for your variable, most other operations aren't atomic. On most architectures, incrementing and decrementing isn't atomic. And if you're trying to do thread synchronisation, you often need higher operations like fetch-and-add, compare- and-swap or simple swap. 3) volatile does not (usually) generate memory barriers There are two types of memory barriers: compiler and processor ones. Take the following code: value = 123456; spinlock = 0; Where spinlock is a volatile int. Two levels of things might go wrong there: first, since there's no compiler barrier, the compiler might generate code that stores the 0 to the spinlock (unlocking it) before it generates the code that saves the more complex value to the other variable. I'm not even talking hypotheticals or obscure architectures. This is what the ARMv7 compiler generated for me: movwr1, #57920 mov r0, #0 movtr1, 1 str r0, [r2, #0] str r1, [r3, #0] This example was intentional because I knew that ARM can't load a large value to a register in a single instruction. Loading 123456 requires two instructions (move and move top). So I expected the compiler to schedule the saving of 0 to before the saving of the more complex value and it did. And even when it does schedule things in the correct order, the memory barrier might be missing. Taking again the example of ARMv7, saving a zero to value and unlocking the mutex: mov r1, #0 str r1, [r2, #0] str r1, [r3, #0] The ARMv7 architecture, unlike x86, *does* allow the processor to write to main RAM in any order. That means another core could see the the spinlock being unlocked *before* the new value is stored, even if the compiler generated the proper instructions. It's missing the memory barrier instruction. The Qt 4 QAtomicInt API does not offer a load-acquire or a store-release operation. All reads and writes are non-atomic and may be problematic -- you can work around that by using a fetch-and-add of zero for load or a fetch-and- store for store. The Qt 5 API does offer the right functions and even requires you to think about it. The reason I said usually is because there is one architecture whose ABI requires acquire semantics for volatile loads and
Re: [Interest] [QtQuick] A couple of questions regarding focus
Try to search in Qt bugzilla... I think there were lots of bugs connected with focus and workarounds about them. Also about you first question - I think you need to manually track focus to know which item has it On Wed, Sep 12, 2012 at 7:21 PM, Preet prismatic.proj...@gmail.com wrote: Hiya, I'm having trouble giving specific items in my application focus in Qml. First: Is it possible to query the scene to see which item currently has focus (without setting some visual output property on each and every possible thing that can receive focus)? Second, I have a specific case where I have a TextEdit loaded dynamically as a component in a ListView when certain criteria are met. When this ListView becomes visible, I'd like the TextEdit to be active so that any key events go directly to it. I've tried directly requesting focus (focus: true), calling forceActiveFocus(), etc when creating the TextEdit, but in general I'm shooting in the dark. I set the currentIndex to the index that contains the TextEdit, and I can get as far as verifying that the delegate item that contains the TextEdit has activeFocus, but nothing I do gives the TextEdit itself focus. delegate: http://pastie.org/4708504 TextEdit: http://pastie.org/4708507 I'd appreciate any advice, Preet ___ 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] Qt Events/Signals and Loops (while ... for..)
No, he means you don't need infinite loop. Read about Qt event system to get understanding about your problem On Wed, Aug 29, 2012 at 6:56 PM, Abhishek abhishekwo...@gmail.com wrote: do you mean return statement after my loop ? like while(x==true){..} return; but I have while(x == true) { ... } which I want to stop when I receive stop message from my client. On Wed, Aug 29, 2012 at 4:44 PM, Thiago Macieira thiago.macie...@intel.com wrote: On quarta-feira, 29 de agosto de 2012 16.19.46, Abhishek wrote: Hello all, I have a program in which on main thread I have TCP server to receive messages and process on it. - on one specific message TCP server start one while infinite loop - to stop this loop I have another TCP message but while in loop I see that I am not able to receive any TCP signals. I tried adding QCoreApplication::processEvents() in my loop but nothing work. Please let me know the proper way to handle such situation. Add this: return; Let your application return to the main event loop. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center Intel Sweden AB - Registration Number: 556189-6027 Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest -- Abhishek http://thezeroth.net ___ 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
[Interest] qt plugins path for QtBrowserPlugin
I develop MacOS safari plug-in using QtBrowserPlugin Deploy Contents/Plugins/imageformats/libqjpeg.dylib with my safari plug-in. But QT code does not find it. Safary plugin gives this information: qDebug() Library paths: QCoreApplication::libraryPaths(); prints: Library paths: (/Applications/Safari.app/Contents/MacOS) qDebug() App path: QCoreApplication::applicationDirPath(); prints: App path: /Applications/Safari.app/Contents/MacOS But Safari plug-in itself is located in ~/Library/Internet Plug-Ins or in /Library/Internet Plug-Ins So I need to call qApp-setLibraryPath( + ~/Library/Internet Plug-Ins/my.plugin/Contents/Plugins); How can I find out location of safari plug-in, if applicationDirPath() gives location of safari app, not location of its plug-in? -- Sergey ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] qInstallMsgHandler in QAxServer
Hello, Is it possible to call qInstallMsgHandler in my qaxserver in-process server before creating exported controls? So that message handler would write to log file all information from the moment of loading activex dll into memory? -- Sergey ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] -MT and static QT
Hello, I've found this article: http://qt-project.org/faq/answer/why_does_a_statically_built_qt_use_the_dynamic_visual_studio_runtime_librar I'm using vs2005, QT 4.5.3 Built it statically, with QMAKE_CFLAGS_RELEASE= -O2 -MT in mkspecs\win32-msvc2005\qmake.conf But I didn't removed call to mt.exe in mkspecs/features and everything works well. I have such manifests in my dll/exe files: assembly xmlns=urn:schemas-microsoft-com:asm.v1 manifestVersion=1.0 dependency dependentAssembly assemblyIdentity type=win32 name=Microsoft.Windows.Common-Controls version=6.0.0.0 publicKeyToken=6595b64144ccf1df language=* processorArchitecture=*/assemblyIdentity /dependentAssembly /dependency /assembly What does this phrase mean: For Visual Studio 2005 it is also necessary to change the relevant files in mkspecs/features to remove the call to mt.exe If I search for phrase mt.exe in mkspecs\features, I find 2 files: - embed_manifest_dll.prf - embed_manifest_exe.prf What changes are needed in this text of embed_manifest_dll.prf?: MANIFEST_DIR = $$OBJECTS_DIR isEmpty(MANIFEST_DIR):MANIFEST_DIR = . !if(plugin:no_plugin_manifest):if(win32-msvc2005|win32-msvc2008):!static:!equals(TEMPLATE_PREFIX, vc):equals(TEMPLATE, lib) { NOPATH_TARGET = $$TARGET NOPATH_TARGET ~= s,\\ , ,q # Remove space escaping (NOPATH_TARGET is quoted) NOPATH_TARGET ~= s,\\,/,g # Change to single type separators NOPATH_TARGET ~= s,^(.*/)+,,# Remove all paths QMAKE_LFLAGS += /MANIFEST $$quote(/MANIFESTFILE:\$${MANIFEST_DIR}\\$${NOPATH_TARGET}.intermediate.manifest\) QMAKE_PREV_POST_LINK = $$QMAKE_POST_LINK QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \$$replace(MANIFEST_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\ -outputresource:$(DESTDIR_TARGET);2$$escape_expand(\n\t)) QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK QMAKE_CLEAN += \$$replace(MANIFEST_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\ } And else one question: they write: we have experienced memory problems when using anything but the -MD(d) flag, and in general, it is recommended to use. You should not alter this flag yourself for your application, because it conflicts with how the Qt library is built if you change the flag to -MT. You should not change it for Qt either, since it is likely to cause problems. If I use -MT, how can I detect if there are problems with memory in my app, they are writing about? -- Sergey ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] self-register qaxserver in HKEY_CURRENT_USER\Software\Classes\CLSID instead of HCR\CLSID
Hello, Is it possible somehow to tune qaxserver so that it would register itself in HKEY_CURRENT_USER\Software\Classes\CLSID instead of HCR\CLSID? I need it so that non-privileged user could register my ActiveX. -- Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] debug QtBrowserPlugin
Hello, How to debug QtBrowsePlugin application, so that I could step by each line of code in Visual Studio? If my Plugin crushes in browser, how to find line of code, where crush happens? -- Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] qtbrowserplugin-2.3-opensource\examples\trivial
Hello, I've downloaded qtbrowserplugin-2.3-opensource Built qtbrowserplugin-2.3-opensource\examples\trivial into release\nptrivial.dll How to install nptrivial.dll as plugin into FireFox, Chrome? -- Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] embed any ActiveQt example into IE webpage
Hi, list I'm trying to write sample ActiveX on QT and embed it into html webpage for IE. I have created in Visual Studio 2005: File-New-Project-Qt4 Projects-ActiveQT server Built project. Got dll. Added path with QT dlls to system path variable. called regsvr32 tetrix.dll created html page: html body OBJECT ID=QTetrix width=550 height=370 CLASSID=CLSID:1DDD955F-4E4E-4BE2-A24E-995D311183E1 /OBJECT /body /html CLASSID I've got from this line: QAXFACTORY_DEFAULT(QTetrix, {1DDD955F-4E4E-4BE2-A24E-995D311183E1}, {6DDED92D-A9AD-4076-B1B8-EC1778E58620}, {D747F84D-1BAE-4CBB-AA9A-4E98EBA24A45}, {DA822482-EAD9-420A-8569-9E003846CEC5}, {21B27F64-7765-4220-8855-5F56A0AE2556}) When I open page in IE, it asks for prompt to launch ActiveX. I select yes. IE displays area, which looks like image, which browser could not download - empty area with red cross in the left-upper corner. How to find reason, why it is not displaying QT widget? Is there some log of IE interaction with ActiveX? Is there some ready QT ActiveX example with instructions, which would allow to display it in IE? -- Thanks ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] QT 4.5.3 on Lion MacOS
Hello, My QT application was built on MacOS 10.4 (Tiger) Tiger is installed on my Mac-Mini computer, used for building program releases. One of the program users installed program on MacOS Lion. Jpeg images in program on Lion MacOS have corrupted colors. So now I need to debug and solve this problem. I have a couple questions about versions of MacOS: 1. Will I be able to build QT 4.5.3 itself on Lion MacOS? 2. If I will use Lion OS for building QT 4.5.3 applications, will these applications work on Tiger, Leopard, Snow Leopard? -- Thanks! ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest