[Interest] QClipboard - wasm

2021-05-06 Thread Nicholas Yue
Hi,

  I have build a Qt app on Ubuntu which I am able to set the clipboard text

qclip->setText(validate_commit_message_plaintext);


  I then proceeded to build a WASM equivalent but found that the
clipboard does not get the setText() update.


  I had a read of the article https://wiki.qt.io/Qt_for_WebAssembly


  I am hosting the example on an HTTPS server and connecting it via
Chrome and Firefox, both of which the clipboard does not get the
updates.


  Any suggestions?


Cheers

-- 
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QPlainTextEdit - word wrap column setting ?

2021-05-06 Thread Nicholas Yue
Hi,

  Is there a way to set the maximum allowable columns e.g. set to 80, and
when the user try to type pass that column, the word is automatically
wrapped to the next line to allow the user to continue ?

Cheers
-- 
Nicholas Yue
Graphics - Arnold, Alembic, RenderMan, OpenGL, HDF5
Custom Dev - C++ porting, OSX, Linux, Windows
http://au.linkedin.com/in/nicholasyue
https://vimeo.com/channels/naiadtools
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


Re: [Interest] QML Singleton and QTimer?

2021-05-06 Thread Jérôme Godbout
You can check the thread affinity of an object and the current thread that will 
display the problem you encounter. Use a queued signal into the QTimer thread 
to sent the start (it will be delayed until the thread process the event, 
hopefully you do no need precision there).

Jérôme Godbout, B. Ing.

Software / Firmware Team Lead
O: (418) 682-3636 ext.: 114
C: (581) 777-0050
godbo...@dimonoff.com
[signature_93124102]
dimonoff.com
1015 Avenue Wilfrid-Pelletier,
Québec, QC G1W 0C4, 4e étage


From: Interest  on behalf of Jason H 

Date: Thursday, May 6, 2021 at 5:34 PM
To: interestqt-project.org 
Subject: [Interest] QML Singleton and QTimer?
I'm trying to have a simple singleton class, but it doesn't appear that I can 
use timers?


HardwareInterface::HardwareInterface(QObject *parent) : QObject(parent)
{
m_timer = new QTimer(this);

connect(m_timer, ::timeout, this, [=](){
qDebug() << Q_FUNC_INFO;
});

m_timer->start(100); // QObject::startTimer: Timers can only be used 
with threads started with QThread

}

main.cpp: int main() {
...
qmlRegisterSingletonInstance("com.company.example", 1, 0, "HardwareInterface", 
);
...

How do we go about using timers in singletons?

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest
___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest


[Interest] QML Singleton and QTimer?

2021-05-06 Thread Jason H
I'm trying to have a simple singleton class, but it doesn't appear that I can 
use timers?


HardwareInterface::HardwareInterface(QObject *parent) : QObject(parent)
{
m_timer = new QTimer(this);

connect(m_timer, ::timeout, this, [=](){
qDebug() << Q_FUNC_INFO;
});

m_timer->start(100); // QObject::startTimer: Timers can only be used 
with threads started with QThread

}

main.cpp: int main() {
...
qmlRegisterSingletonInstance("com.company.example", 1, 0, "HardwareInterface", 
);
...

How do we go about using timers in singletons?

___
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest