For something like that, you need to use qscrollview as a parent widget. When virtual keyboard appear, application window always have enough space for all childs. I wait your feedback as soon as posibble![]()
ok i can't figure out a solution around this one and any help is greatly appreciated:
I have an EZX/Qt app with a QLineEdit widget at the very bottom of the screen. If I click on that widget to input text, the keyboard appears and the application just crashes. However other QLineEdits above it seem to be working fine. The problem as I can see it is that cause of the keyboard resizing the screen something happens with widgets that are at the very bottom of the screen, ones that don't have enough space underneath with height close to that of the keyboard's. Is it possible to disable the automatic shifting of the QLineEdit receiving foucs at the moment so that the keyboard will still be on top of the QLineEdit covering it? That's the only way I can think of as this keyboard keeps crashing widgets at the very bottom (only those that need keyboard input however). Any ideas? Thanks.
For example say you have a QLineEdit at (0,120), when you click on it the keyboard shows up and everything's fine. However if there's another QLineEdit at (0,220) the keyboard shows and the application crashes. Why's that I don't know. Anyone?
Please advise as soon as possible.
For something like that, you need to use qscrollview as a parent widget. When virtual keyboard appear, application window always have enough space for all childs. I wait your feedback as soon as posibble![]()
eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6
Actually yes I'm using QScrollView as the parent widget. The problem happens with the QLineEdit at the very bottom, other QLineEdits shift fine (with the keyboard showing and everything) and the app doesn't crash. Let me be more specific: I have five QLineEdit boxes evenly spaced vertically across a QScrollView widget with the fifth one at the very bottom. The whole view adds up to 320 in height so the vertical scroll bar is already enabled (I have some image at the top followed by the QLineEdit boxes, the first QLineEdit is at height 150 and the last one at 280). When I click that one at the bottom the app crashes. What's even more strange is that if I remove the first QLineEdit and I click the last one (now the 4th) the app doesn't crash! I honestly think it's some kind of bug with Qt but I'm not sure. I thought maybe if I just disable the automatic shifting that'll solve the problem but I can't seem to find a way to do that. Turns out that's a problem with every other view I have: if the QLineEdit I'm clicking is near the bottom of the screen, even if there are several widgets below it and above it and the vertical scroll bar is working, if I don't scroll enough height for the keyboard the app just crashes... I have to scroll enough for that QLineEdit to be like in the middle of the screen... Of course that I don't want cause then the app wouldn't be stable enough...
I have to simulate your situation. Please wait my feedback.
eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6
Code stolen from E680 SDK example, built against modified samr7's dev-ezx. You need to add zscroolview.h, zmultilineedit.h, zskin.h, zresource.h to samr7 include dir from E680 SDK. You need to modify zpushbutton.h (remove all related zskin class header) and add all static define in E680 SDK's ZIMethode.h to samr7's zglobal.h. You need to learn my setenv.sh script. Confused? Run my binary included. Waiting for your feedback.
eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6
So did you actually reproduce the problem I explained above and fixed it in the above code or is this just example code which happens to be stable?
Not sure what is your need exactly. I try to write something like your explain above and make sure it is stable. I have modified E680 SDK example code (original code raise seg. fault), very happy because now I can popup different keyboard layout for different editable widget.
eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6
The original raises a seg. fault? I see, that's probably it! And this seg. fault happens because of the virtual keyboard?
No, no about virtual keyboard but seg. faults before show app window. Before show anything -> seg. faults.
eXMMS and Rockbox running on E680, E680i, E680g, A780, A1200 and ROKR E6
I see. Well did you try using QLineEdit widgets instead for text input? I haven't tried using ZMultiLineEdit but maybe QLineEdit is in fact the problem?