Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader > Kobo Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 08-27-2020, 05:08 PM   #1
the_real_mcarn
Junior Member
the_real_mcarn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2020
Location: The Netherlands
Device: Kobo Glo
Qt Programming on Kobo

Hello everyone,

I recently found out you could run Qt apps on Kobo devices and I was very interested, having some experience in Qt I decided to try it out. I managed to get a working toolchain using the guide from the UltimateMangaReader GitHub. Using Qt Creator I took the default widget application and tried to compile it, everything goes fine untill I try to run it on the actual device. It throws the following error with
Code:
QT_DEBUG_PLUGINS=1
Code:
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/onboard/.adds/qt-linux-5.15.0-kobo/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/mnt/onboard/.adds/qt-linux-5.15.0-kobo/plugins/platforms/libkobo.so"
Found metadata in lib /mnt/onboard/.adds/qt-linux-5.15.0-kobo/plugins/platforms/libkobo.so, metadata=
{
    "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
    "MetaData": {
        "Keys": [
            "kobo"
        ]
    },
    "archreq": 0,
    "className": "KoboPlatformIntegrationPlugin",
    "debug": false,
    "version": 331520
}

Got keys from plugin meta data ("kobo")
QFactoryLoader::QFactoryLoader() checking directory path "/mnt/onboard/.adds/test/platforms" ...
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: kobo.

Aborted
I'm trying to run my application on a Kobo Glo on firmware 4.23.15548 over telnet using the folowing script: (also from UltimateMangaReader)

Code:
export ADDSPATH=/mnt/onboard/.adds
export EXECPATH=${ADDSPATH}/test
export QTPATH=${ADDSPATH}/qt-linux-5.15.0-kobo

export QT_DEBUG_PLUGINS=1

sh ${EXECPATH}/exit_nickel.sh

LD_LIBRARY_PATH=${QTPATH}/lib:lib:
QT_QPA_PLATFORM=kobo:touchscreen_rotate=auto:touchscreen_invert_x=auto:touchscreen_invert_y=auto:logicaldpitarget=108

${EXECPATH}/test

sh ${EXECPATH}/start_nickel.sh
The application executable is test in the folder
Code:
/mnt/onboard/.adds/test/
As far as I know it shouldn't be looking for the xcb plugin in the first place and certainly not in .adds/test/platforms because that folder doesn't exist.

I was wondering if anyone could help me to get this working because I have no idea now to continue from this point.

Thanks in advance.
the_real_mcarn is offline   Reply With Quote
Old 08-27-2020, 06:50 PM   #2
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You're not exporting `QT_QPA_PLATFORM`.
NiLuJe is offline   Reply With Quote
Advert
Old 08-27-2020, 06:53 PM   #3
geek1011
Wizard
geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.geek1011 ought to be getting tired of karma fortunes by now.
 
Posts: 2,758
Karma: 6990705
Join Date: May 2016
Location: Ontario, Canada
Device: Kobo Mini, Aura Edition 2 v1, Clara HD
Try exporting LD_LIBRARY_PATH and QT_QPA_PLATFORM too.

Edit: NiLuJe responded as I was writing this.
geek1011 is offline   Reply With Quote
Old 08-27-2020, 06:54 PM   #4
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Oh, I'd missed the LD_LIBRARY_PATH ;p.
NiLuJe is offline   Reply With Quote
Old 08-30-2020, 08:55 AM   #5
the_real_mcarn
Junior Member
the_real_mcarn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2020
Location: The Netherlands
Device: Kobo Glo
Thanks a lot, that worked and it now compiles and runs fine, however, the touch controls are messed up. I have tried several different settings in the QT_QPA_PLATFORM line but it almost seems as if the touch area is shifted off to the left somehow both with high dpi scaling and without. Is there any what to fix this or am I missing something (again)?

Thanks in advance.
the_real_mcarn is offline   Reply With Quote
Advert
Old 08-30-2020, 08:58 AM   #6
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
AFAIK, the author of the QPA only has access to a single device, and we know that input on Kobo is... extremely unfun to deal with.

(i.e., PRs welcome to fix the QPA on that front. Looking at Plato or KOReader should give you a hint as to what that might entail.).

Last edited by NiLuJe; 08-30-2020 at 01:54 PM.
NiLuJe is offline   Reply With Quote
Old 08-30-2020, 09:05 AM   #7
the_real_mcarn
Junior Member
the_real_mcarn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2020
Location: The Netherlands
Device: Kobo Glo
Might it be worth it to use another QPA in that case, and if so, do you know one I can use because I just want to try to create some applications with it and trying to fix the QPA is far beyond my knowledge of Qt.
the_real_mcarn is offline   Reply With Quote
Old 08-30-2020, 01:51 PM   #8
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Nope, the stock QPA is not usable as-is for input either (at all) .
NiLuJe is offline   Reply With Quote
Old 08-30-2020, 01:52 PM   #9
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
That possibly leaves the vlasovsoft QPA, but I don't recall how up to date it is (if it's even Qt5? Might still be Qt4).

And the tooling is probably gnarlier, regardless.
NiLuJe is offline   Reply With Quote
Old 08-30-2020, 05:00 PM   #10
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
@NiLuJe: there's also https://github.com/jdek/qpa-einkfb

He ported quite a few nonQt programs and also provides a buildroot environment tailored for the Kobo. Some background in https://itanimul.li/post/librereader/

I don't know if it works across the whole platform and never tested it, but seems a good repo to lurk.
pazos is offline   Reply With Quote
Old 09-03-2020, 10:30 AM   #11
the_real_mcarn
Junior Member
the_real_mcarn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2020
Location: The Netherlands
Device: Kobo Glo
I've looked into the other QPA mentioned but I cannot get it to work at all, so I would like to try and get the one I'm using now to work on at least the Kobo Glo as well.

After some testing I found out that the coordinates Qt reports are incorrect, the y-axis is fine after rotating the touchscreen values but the QPointF values for the x-axis only run from 0 to 0.5 over the entire screen instead of from 0 to 1. Values returned by evtest are fine tho, could this a problem with the QPA, my start script or the touch screen driver?

Thanks in advance.
the_real_mcarn is offline   Reply With Quote
Old 09-06-2020, 05:27 PM   #12
the_real_mcarn
Junior Member
the_real_mcarn began at the beginning.
 
Posts: 8
Karma: 10
Join Date: Aug 2020
Location: The Netherlands
Device: Kobo Glo
Alright, It seems that Qt or is mapping the resolution of the ir touchpad (1600x1200) one to one to the resolution of the screen, which is only 1024×758, therefore half of the screen is not touchable. Is there any way to scale the input of the touch screen to the right size from within Qt or is there some other way?

Other question, is there any other framework like Qt that can be used to create programs for Kobo? As far as I know KOReader and Plato have been written entirely from scratch.

Thanks in advance.
the_real_mcarn is offline   Reply With Quote
Old 09-06-2020, 06:13 PM   #13
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,480
Karma: 26012494
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Someone motivated enough could potentially build something out of the KOReader framework, but I don't think anyone's ever made any real attempt public.

(But I seem to recall both @pazos & @houqp having dipped their toes in that direction for private projects?)

The current mess you're in should probably answer why both KOReader & Plato have indeed been written from scratch ^^ .
NiLuJe is offline   Reply With Quote
Old 09-07-2020, 12:10 PM   #14
pazos
cosiñeiro
pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.pazos ought to be getting tired of karma fortunes by now.
 
Posts: 1,275
Karma: 2200073
Join Date: Apr 2014
Device: BQ Cervantes 4
I did a weekend project with SDL to turn on a Aura HD with broken IR into a weather clock. Used SDL1.2 because 2.0 droped support for framebuffer output.

The code there is pretty bad but could work as an example. I did that before FBInk was released and certainly would choose FBInk instead for prototyping nowadays.

Anyways, here you are: https://github.com/pazos/kobo-clock/tree/master/src. SDL will help if you plan to develop some kind of simple game/UI but won't let you build complex apps like Qt.
pazos is offline   Reply With Quote
Old 09-07-2020, 03:55 PM   #15
OfficerAction
Connoisseur
OfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughingOfficerAction can shake the floor when laughing
 
Posts: 80
Karma: 63118
Join Date: May 2018
Device: Kobo Aura One
Quote:
Originally Posted by the_real_mcarn View Post
Alright, It seems that Qt or is mapping the resolution of the ir touchpad (1600x1200) one to one to the resolution of the screen, which is only 1024×758, therefore half of the screen is not touchable. Is there any way to scale the input of the touch screen to the right size from within Qt or is there some other way?
Hey I think it is not realy easily possible to do that from Qt's 'userspace'. Its a bit ugly but I think the best approach would be to patch out that behaviour in the Qt evdevtouch source and recompile it that way. I was also thinking of doing that but without a device to test it it's a bit like poking arount in the dark.
OfficerAction is offline   Reply With Quote
Reply

Tags
kobo glo


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get started with programming? otanim Lounge 5 11-28-2017 06:53 AM
Programming prs-t2 raikoug Sony Reader Dev Corner 2 05-05-2013 03:21 AM
BASIC programming Zeke Deals and Resources (No Self-Promotion or Affiliate Links) 7 03-30-2012 04:19 PM
Kindle - C/C++ programming sergeyvl12 Kindle Developer's Corner 11 12-09-2011 02:04 PM
PRS-500 500 Programming MarzKrishna Sony Reader Dev Corner 1 12-17-2009 08:43 PM


All times are GMT -4. The time now is 11:53 PM.


MobileRead.com is a privately owned, operated and funded community.