[Interest] QListView - make tab key behave like enter key

2019-03-18 Thread Frank Rueter | OHUfx
Hi all, I have a simple QListView in which I would like to edit items by clicking into empty space, typing, then hitting either enter or tab. I’d like the tab Key_Tab event to behave exactly like Key_Enter event, but it’s a bit stubborn. When I hit tab while editing an item (i.e. editor is open

Re: [Interest] How to detect a HiDPI display with Qt?

2019-03-18 Thread Thiago Macieira
On Monday, 18 March 2019 09:59:36 PDT Vadim Peretokin wrote: > I'm not clear on how to detect if a display is HiDPI with Qt. I've tried > QApplication.desktop()->screen()->devicePixelRatio() but even that returns > 1 for a display that is 3840x2160. That is the correct way. The problem is that the

Re: [Interest] How to detect a HiDPI display with Qt?

2019-03-18 Thread Jérôme Godbout
I do Qml, so // C++, expose the m_image_scale as a meta property class MyApp : public QObject { Q_OBJECT Q_PROPERTY(QString imageScale read imageScale CONSTANT) public: // MyApp init should extract the string scale as previously stated, this function only returns the QSt

Re: [Interest] How to detect a HiDPI display with Qt?

2019-03-18 Thread william.croc...@analog.com
You can also check the device pixel ratio for image “@2” alike: qreal pixel_ratio = QGuiApplication::primaryScreen()->devicePixelRatio(); unsigned int image_scale_ratio=pixel_ratio/1u; QString m_image_scale = image_scale_ratio<=1u ? "" : QString("@%1x").arg(image_scale_ratio); Please kee

Re: [Interest] How to detect a HiDPI display with Qt?

2019-03-18 Thread Jérôme Godbout
You can also check the device pixel ratio for image “@2” alike: qreal pixel_ratio = QGuiApplication::primaryScreen()->devicePixelRatio(); unsigned int image_scale_ratio = pixel_ratio / 1u; QString m_image_scale = image_scale_ratio <= 1u ? "" : QString("@%1x").arg(image_scale_ratio); This is what

Re: [Interest] How to detect a HiDPI display with Qt?

2019-03-18 Thread Jérôme Godbout
You can check the dpi of the screen: QGuiApplication::primaryScreen()->logicalDotsPerInch(); You can then check if the dpi is above certain threshold to do thing differently. Normal desktop full HD screen dpi is around 96. [36E56279] une compagnie [cid:image002.jpg@01D4DD94.AA6DD510] RAPPROCHE

[Interest] How to detect a HiDPI display with Qt?

2019-03-18 Thread Vadim Peretokin
I'm not clear on how to detect if a display is HiDPI with Qt. I've tried QApplication.desktop()->screen()->devicePixelRatio() but even that returns 1 for a display that is 3840x2160. Has anyone got hints on how to do this successfully? ___ Interest maili

Re: [Interest] Qt on direct compose

2019-03-18 Thread Giuseppe D'Angelo via Interest
Hi, On 18/03/2019 14:32, Pierre Lamot wrote: Before starting to perform a draw call, DComposition will inform you where it expect you to perform your drawing within the texture it gives you, like an OpenGL viewport. In most cases this will be (0,0) and will works out of the box. Though, especi

[Interest] Qt on direct compose

2019-03-18 Thread Pierre Lamot
Hello, I'm trying to render to QML to Direct Composition [1] surfaces. This can be achieve by getting Qt to render its scene to a special PBO created by ANGLE. I got this part working by following advises from [2] and [3]. Before starting to perform a draw call, DComposition will inform you w