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
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
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
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
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
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
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
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
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