Re: [Interest] automatic UI updates as the result of QML file modifications
Yes. I’ve done this. I have a realtime coding environment in which the running app will reload and redraw qml on file change. It’s relatively easy to setup. I’ve even set it up so that it’ll draw iPad and iPhone sized windows next to a reduced desktop window on my mac desktop machine. That's really cool! But how do you reload not root QML files? p.s. I think having such functionality in Qt out-of-box would be a killer feature. 2014/1/25 Joshua Kolden jos...@crackcreative.com Yes. I’ve done this. I have a realtime coding environment in which the running app will reload and redraw qml on file change. It’s relatively easy to setup. I’ve even set it up so that it’ll draw iPad and iPhone sized windows next to a reduced desktop window on my mac desktop machine. The basics are that I use a QFileSystemWatcher to notice a qml file change and signal to reload the qml. The only extra step is to call clearComponentCache() on the qml engine each time before reloading the qml. javascript files also need to be updated in my case because I’m using coffeescript, so there is a compile step required before loading. For this I use “guard” (ruby file watcher gem, but you could use anything). It watches for any changes to the caffescript files, and runs make to build the js. I do all my development in ram disk, so the combined effect is a completely interactive real time text driven design interface. I really recommend it. On Jan 24, 2014, at 9:57 AM, Alexander Ivash elder...@gmail.com wrote: Did anybody implement such functionality? Is is possible at all? Having this would be extremely helpful for fine-tuning UI. ___ 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] QTableView column format
On 01/22/2014 10:24 AM, André Somers wrote: If you want to modify it at the 'view' end, you should use a QStyledItemDelegate subclass and install that on the view, or on a specific column of the view. I did that exactly but unfortunately it didn't work :( May you please tell me what's wrong?! I'm still get 5.25446e+06 for 5254458.963 I call the following: --- ui-tableView-setModel(_tableModel); ui-tableView-resizeColumnsToContents(); EcsLongDigitDelegate *delegate = new EcsLongDigitDelegate; ui-tableView-setItemDelegateForColumn(2, delegate); --- Database table (SQLite): --- CREATE TABLE names (id INTEGER PRIMARY KEY NOT NULL ,nam_full_name TEXT,nam_id DOUBLE DEFAULT (null) ); --- Delegate class: --- #include ecslongdigitdelegate.h EcsLongDigitDelegate::EcsLongDigitDelegate(QObject *parent) : QStyledItemDelegate(parent) { } QWidget *EcsLongDigitDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem option, const QModelIndex index) const { QDoubleSpinBox *editor = new QDoubleSpinBox(parent); editor-setFrame(false); editor-setMinimum(0); editor-setDecimals(3); editor-setMaximum(); return editor; } void EcsLongDigitDelegate::setEditorData(QWidget *editor, const QModelIndex index) const { double value = index.model()-data(index, Qt::DisplayRole).toDouble(); QDoubleSpinBox *spinBox = static_castQDoubleSpinBox*(editor); spinBox-setValue(value); } void EcsLongDigitDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex index) const { QDoubleSpinBox *spinBox = static_castQDoubleSpinBox*(editor); spinBox-interpretText(); double value = spinBox-value(); model-setData(index, value, Qt::DisplayRole); } void EcsLongDigitDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem option, const QModelIndex index) const { editor-setGeometry(option.rect); } --- -- Best Regards, Muhammad Bashir Al-Noimi ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] QTableView column format
Muhammad Bashir Al-Noimi schreef op 25-1-2014 12:13: On 01/22/2014 10:24 AM, André Somers wrote: If you want to modify it at the 'view' end, you should use a QStyledItemDelegate subclass and install that on the view, or on a specific column of the view. I did that exactly but unfortunately it didn't work :( May you please tell me what's wrong?! Your delegate is dealing with the editor, but not with the display. Try reimplementing the displayText method. Also, check if the data type you get from the database really is numerical. SQLite can be weird with data types in my experience. André I'm still get 5.25446e+06 for 5254458.963 I call the following: --- ui-tableView-setModel(_tableModel); ui-tableView-resizeColumnsToContents(); EcsLongDigitDelegate *delegate = new EcsLongDigitDelegate; ui-tableView-setItemDelegateForColumn(2, delegate); --- Database table (SQLite): --- CREATE TABLE names (id INTEGER PRIMARY KEY NOT NULL ,nam_full_name TEXT,nam_id DOUBLE DEFAULT (null) ); --- Delegate class: --- #include ecslongdigitdelegate.h EcsLongDigitDelegate::EcsLongDigitDelegate(QObject *parent) : QStyledItemDelegate(parent) { } QWidget *EcsLongDigitDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem option, const QModelIndex index) const { QDoubleSpinBox *editor = new QDoubleSpinBox(parent); editor-setFrame(false); editor-setMinimum(0); editor-setDecimals(3); editor-setMaximum(); return editor; } void EcsLongDigitDelegate::setEditorData(QWidget *editor, const QModelIndex index) const { double value = index.model()-data(index, Qt::DisplayRole).toDouble(); QDoubleSpinBox *spinBox = static_castQDoubleSpinBox*(editor); spinBox-setValue(value); } void EcsLongDigitDelegate::setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex index) const { QDoubleSpinBox *spinBox = static_castQDoubleSpinBox*(editor); spinBox-interpretText(); double value = spinBox-value(); model-setData(index, value, Qt::DisplayRole); } void EcsLongDigitDelegate::updateEditorGeometry(QWidget *editor, const QStyleOptionViewItem option, const QModelIndex index) const { editor-setGeometry(option.rect); } --- ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Shiping Qt binaries
plugins/platforms/qwindows.dll plugins/sqldrivers/qsqlite.dll I have run the vcredist as part of the install procedure. It's Qt 5.1 with visual studio 2010. The qt.conf file in bin looks like this: [Paths] Prefix = .. This is what I did to make Qt find the plugins in the place where I wanted it. Interesting. I have a similar layout. With one exception: For me it was absolute necessary to have the platforms folder in the same level as the executable, i.e. bin/platforms/,,, Your layout worked for me perfectly for Qt4, but not Qt5. But I use mingw. Guido ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
Re: [Interest] Integrating with WPF through ANGLE's IDirect3DSurface9
Lines 309–313 of https://chromium.googlesource.com/angle/angle/+/0af35c748e210290e4a4d51e0958baef867bf9e7/include/EGL/eglext.h(I chose a specific commit instead of master to be sure everyone will see the same file no matter how much time passes) suggest there's no way to enforce Direct3D 9 backend. And, to be honest, I don't see any good reason for Qt to expose that part of EGL context creation — it's not Qt's business what EGL/GLES implementation is actually used (IMHO everything that's supposed to use OpenGL ES should rely exclusively on its specifications with conformance being a concern of particular implementation's developers). On Sat, Jan 25, 2014 at 7:39 PM, Thomas Sevaldrud tho...@silentwings.nowrote: Thanks, I'll take a look at that extension. It could definitely be what I'm looking for :-) It is a concern with the backend being either DX9 or DX11 though, but at least when using ANGLE directly I think you can choose which backend you want to use. Not sure if/how that is exposed through Qt or the EGL APIs though. - Thomas On Sat, Jan 25, 2014 at 2:01 AM, Constantin Makshin cmaks...@gmail.comwrote: Ah, ignore my previous message, I misunderstood the original question (really shouldn't be wandering around the Internet at ~5AM :) ). Function eglQuerySurfacePointerANGLE() from ANGLE's EGL extension EGL_ANGLE_query_surface_pointer may be what you're looking for. On Jan 24, 2014 8:57 PM, Thomas Sevaldrud tho...@silentwings.no wrote: Hello, I know that what I'm about to ask is somewhat of a heresy, but is there a way to access to the IDirect3DSurface9 used as a back buffer by the ANGLE OpenGL Wrapper in Qt? The ultimate goal of this hack is to integrate a QWindow into a WPF application. I know this sounds real evil, but the WPF requirement is way out of my control, and I would really like to avoid copying the frame buffer via system memory. By using the D3DSurface I can simply plug it into a D3DImage in .NET (I've done this with other D3D applications before, so I know it works) I've been digging around in the Qt code but this far I haven't been able to figure out exactly how ANGLE is initialized and where it fits into the rest of everything. Any insight into this would be greatly appreciated. - Thomas ___ 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 mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Unit test with multiple data
Hi I'm writing a test unit using Qt's QtTest library. My test case requires three strings (database host, username and password) that they should be passed in command line. Documentation says data is passed to test unit in the following syntax: testname [options] [testfunctions[:testdata]]... How can I pass more that one `testdata' to a test function? I've tried something like: testname testfunctions:data1:data2:data3 ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest
[Interest] Multi language/font display in qt4
Hello all, In my application I need to display text in more then one language simultaneously. No problem if the language are english and french for example, the problem is when needed to display english and chinese or korean or others. The font we use now (which is ok for latin text) is dejavu sans but it doesn't support all east font languages. If i change the font to a chinese one, i can display chinese characters but latins become ugly... Since i know that there isn't a full unicode font, It would be perfect to have more then one font and let somewhat decide what to use for each kind of language. There is a solution to do that? I'm using qt 4.8.5 embedded QWS (on an embedded ARM platform). Thanks so much Simone ___ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest