[Interest] FW: [External] QByteArray vs QString, arg, why is there no arg()?

2019-09-18 Thread Kristoffersen, Even (NO14) via Interest
Didn't add the list... I guess the closest you get with a pure QByteArray solution is a two-step operation: auto x = QByteArray::Number(6).rightJustified(10, '0'); -Even -Original Message- From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of Kristoffersen, Even (NO14

Re: [Interest] [External] QByteArray vs QString, arg, why is there no arg()?

2019-09-18 Thread Kristoffersen, Even (NO14) via Interest
Just use the fill() function: https://doc.qt.io/qt-5/qbytearray.html#fill -Even -Original Message- From: Interest [mailto:interest-boun...@qt-project.org] On Behalf Of Jason H Sent: onsdag 18. september 2019 13:16 To: interest@qt-project.org Subject: [External] [Interest] QByteArray vs

Re: [Interest] [External] Interface with signals and slots

2019-02-18 Thread Kristoffersen, Even (NO14)
Really late response, but why inherit QObject in MyClass rather than IMyInterface? Since all the objects inheriting from IMyInterface needs to be QObjects you can just do this: class IMyInterface : public QObject { Q_OBJECT etc... } class MyClass : public IMyInterface { Q_OBJECT and so on...

Re: [Interest] [External] [SVG] QML Image: Error decoding

2018-07-17 Thread Kristoffersen, Even (NO14)
Do you have QT_PLUGIN += qsvg in your .pro file as well? -Even From: Interest [mailto:interest-bounces+even.kristoffersen=honeywell@qt-project.org] On Behalf Of Oleg Evseev Sent: 16. juli 2018 17:56 To: Qt Project Subject: [External] [Interest] [SVG] QML Image: Error decoding Hi! Got

Re: [Interest] Updating NumberAnimation from/to at runtime

2017-07-14 Thread Kristoffersen, Even (NO14)
You can try to force binding with Qt.binding(). -Even From: Interest [mailto:interest-bounces+even.kristoffersen=honeywell@qt-project.org] On Behalf Of Shantanu Tushar Sent: 14. juli 2017 11:27 To: interest@qt-project.org Subject: [Interest] Updating NumberAnimation from/to at runtime Hi,

Re: [Interest] iOS release build uncount issues - implicit conversion loses integer precision

2017-06-19 Thread Kristoffersen, Even (NO14)
On 64 bit systems that piece of code does pointer1 – pointer2, which would be a 64 bit value, then implicitly doing a narrowing cast since the function returns an int (32 bit value on your arch). Anyway, fastest fix is probably to just disable the shorten-64-to-32 warning in the release kit or

Re: [Interest] Qt 5.8 and QPainter based rendering

2017-04-24 Thread Kristoffersen, Even (NO14)
The trick I use with SVGs is to scale the "sourceSize" of the image. SvgImage.qml - Image { sourceSize.width: width *scale sourceSize.height: height *scale } Main.qml -- scale: 3.0 SvgImage { height: 40 width: 40 source: "someImage.svg" } This way

Re: [Interest] QML dir hierarchy

2017-01-05 Thread Kristoffersen, Even (NO14)
-bounces+even.kristoffersen=honeywell@qt-project.org] On Behalf Of Kristoffersen, Even (NO14) Sent: 5. januar 2017 09:07 To: interestqt-project.org <interest@qt-project.org>; qt-creator <qt-crea...@qt-project.org> Subject: Re: [Interest] QML dir hierarchy Try putting your QML files i

Re: [Interest] QML dir hierarchy

2017-01-05 Thread Kristoffersen, Even (NO14)
Try putting your QML files in subfolders. You will probably want to do this sooner or later anyway to keep your source tree manageable as the project grows. Just beware that you then have to import the folder of the components you are using from within the QML files unless they are in the same

Re: [Interest] QQmlEngine: Illegal attempt to connect to PlatformShim(0xb9b2fb58) that is in a different thread than the QML engine QQmlApplicationEngine(0xa17e1494.

2016-12-02 Thread Kristoffersen, Even (NO14)
The singleton one requires QML to be able to create the instance and own it doesn't it? I'd switch to qmlRegisterUncreatableType() -Even -Original Message- From: Interest [mailto:interest-bounces+even.kristoffersen=honeywell@qt-project.org] On Behalf Of Jason H Sent: 1. desember

Re: [Interest] QML Text.contentWidth is never increasing

2016-10-21 Thread Kristoffersen, Even (NO14)
> > Jason H wrote: > > >Text { > > > id: instructionText > > > color: "white" > > > text: instructionTextData > > > width: contentWidth > parent.width *.9 ? parent.width *.9 : contentWidth > > > font.pointSize: 16 > > > horizontalAlignment: Text.AlignHCenter > > >

Re: [Interest] QML Text.contentWidth is never increasing

2016-10-21 Thread Kristoffersen, Even (NO14)
Jason H wrote: >Text { > id: instructionText > color: "white" > text: instructionTextData > width: contentWidth > parent.width *.9 ? parent.width *.9 : contentWidth > font.pointSize: 16 > horizontalAlignment: Text.AlignHCenter > anchors.horizontalCenter:

Re: [Interest] [QML] Qt.formatDateTime() and AM/PM

2016-07-14 Thread Kristoffersen, Even (NO14)
Elvis: Tack Rainer: Danke Maybe the format function uses the system locale instead of default QLocale, that would explain it. -Even From: Interest [mailto:interest-bounces+even.kristoffersen=honeywell@qt-project.org] On Behalf Of Rainer Wiesenfarth Sent: 14. juli 2016 15:12 To:

[Interest] [QML] Qt.formatDateTime() and AM/PM

2016-07-14 Thread Kristoffersen, Even (NO14)
Hello, I'm having some issue with trying to display a 12 hour clock with am/pm suffix. Documentation (http://doc.qt.io/qt-5/qml-qtqml-qt.html#formatDateTime-method) says: "AP use AM/PM display. AP will be replaced by either "AM" or "PM"." However neither of the following work as described

Re: [Interest] font.pixelSize vs height?

2016-07-01 Thread Kristoffersen, Even (NO14)
Height and fontPixelSize is not related in any way as far as I know. Height is just the height of the bounding box for the text. Also, you do get the real font.pixelSize when asking telephone. It's set to that in your component, but not overridden in your instantiation. -Even -Original

Re: [Interest] qsTr in components

2016-05-26 Thread Kristoffersen, Even (NO14)
lations http://doc.qt.io/qt-5/linguist-id-based-i18n.html to make this approach work. -Even -----Original Message----- From: Kristoffersen, Even (NO14) Sent: 24. mai 2016 11:58 To: Kristoffersen, Even (NO14) <even.kristoffer...@honeywell.com> Cc: interest@qt-project.org Subject: RE: [Interest]

Re: [Interest] qsTr in components

2016-05-23 Thread Kristoffersen, Even (NO14)
2016 15:17 To: Jason H <jh...@gmx.com> Cc: Kristoffersen, Even (NO14) <even.kristoffer...@honeywell.com>; interest@qt-project.org Subject: Re: [Interest] qsTr in components > Sent: Monday, May 23, 2016 at 9:14 AM > From: "Jason H" <jh...@gmx.com>

[Interest] qsTr in components

2016-05-23 Thread Kristoffersen, Even (NO14)
Hello all, I've played around a bit with an approach inspired by http://wiki.qt.io/How_to_do_dynamic_translation_in_QML . I've made a component for easier use: TextTr.qml -- Import QtQuick 2.0 Text { property string txt: "" text: qsTr(txt) + translator.refresh }

Re: [Interest] Clean way to define and categorize constants in QML

2016-04-29 Thread Kristoffersen, Even (NO14)
Those internal elements are not directly accessible. You can try exposing them with the use of alias in the root object. -Even From: Interest [mailto:interest-bounces+even.kristoffersen=honeywell@qt-project.org] On Behalf Of Viktória Nemkin Sent: 29. april 2016 13:04 To:

Re: [Interest] Declaratively handle key presses / navigation differently depending on state (QML)

2016-03-31 Thread Kristoffersen, Even (NO14)
I think Connections is what you are looking for: Connections { id: editingConnections target: null onRightPressed: ... ... ... } Connections { id: navigationConnections target: Keys onRightPressed: ... ... ... }

Re: [Interest] ListView currentItem not changing (5.4)

2015-07-02 Thread Kristoffersen, Even (NO14)
Try to add the following in your items/delegates: Component.onCompleted { ListView.view.currentIndex = index; } -Even -Original Message- From: interest-bounces+even.kristoffersen=honeywell@qt-project.org [mailto:interest-bounces+even.kristoffersen=honeywell.com@qt-

Re: [Interest] ListElement value cannot be a property script

2015-06-05 Thread Kristoffersen, Even (NO14)
Hello, The way I’ve been working around this limitation is to add the list elements programmatically in a Component.onCompleted: script. ListModel { id: example Component.onCompleted: { append(“name”:

Re: [Interest] QtSql database insertion issues...

2015-04-22 Thread Kristoffersen, Even (NO14)
    insertion.prepare(INSERT INTO master_directory (hash, path) VALUES(:hash, :path)); TIA, Ben Seems like you are missing a semicolon at the end of your SQL statements. -Even ___ Interest mailing list Interest@qt-project.org

Re: [Interest] Qt Quick UI Forms item views: best practices

2015-01-20 Thread Kristoffersen, Even (NO14)
From: Alexander Ivash Sent: 20. januar 2015 19:32 To: interest@qt-project.org Subject: [Interest] Qt Quick UI Forms item views: best practices MouseArea { onClicked: root.onClicked(root.model.get(index)); /// this line makes QtCreator unhappy :( } Shouldn’t that be

Re: [Interest] QML Loader sourceComponent Dynamic selection (not source property)

2014-11-17 Thread Kristoffersen, Even (NO14)
} } } } model: glistdata } -Even From: mark diener [mailto:rpzrpz...@gmail.com] Sent: 17. november 2014 04:18 To: Kristoffersen, Even (NO14) Cc: interest@qt-project.org Subject: QML Loader sourceComponent Dynamic selection (not source property) Even

Re: [Interest] How to make conditional compilation in QML

2014-10-10 Thread Kristoffersen, Even (NO14)
If I read your email correctly it would probably be better solution for your problem to have a single Loader and only load the model specified in the config file? Loader { id: 3DModel source: getModelFile()   // Loads the corresponding QML file for the configured model

Re: [Interest] Accessing existing enums from QML

2014-05-14 Thread Kristoffersen, Even (NO14)
Subject: [Interest] Accessing existing enums from QML Hi, my C++ code makes heavy use of quite simple enums which are defined in some namespace, outside of any class (and therefore also outside of any class which derives from QObject). It's done like this: namespace Imap { typedef enum {

Re: [Interest] qt5 shapshot - not git or guitorious

2012-03-16 Thread Kristoffersen, Even (NO14)
On 15.03.12 20:31:28, Jason H wrote: The init-repository script assumes git:// urls. I found the URLs in .gitmodules. I had to change the URLs to: url = [https://git.]gitorious.org/qt/qttools.git where the part inside the brackets is modified it would be *really*cool* if this was specifiable,