|
|
2010-09-30
, 11:07
|
|
|
Posts: 1,023 |
Thanked: 4,421 times |
Joined on Feb 2010
@ Argentina
|
#152
|
| The Following User Says Thank You to CepiPerez For This Useful Post: | ||
|
|
2010-09-30
, 11:09
|
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#153
|
Is the behavrio different, if you use setInputMask instead
of a validator?
http://doc.trolltech.com/4.7/qlineed...inputMask-prop
ui->line_edit_font1->setInputMask("\#NNNNNN");
regards
Nicolai
|
|
2010-09-30
, 11:38
|
|
|
Posts: 1,637 |
Thanked: 4,424 times |
Joined on Apr 2009
@ Germany
|
#154
|
| The Following User Says Thank You to nicolai For This Useful Post: | ||
|
|
2010-09-30
, 13:08
|
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#155
|
That is strange, btw my example was wrong. The format
for Hex-Digits is "HHHHHH". I am pretty sure this should work.
But I can not try it out at the moment. Can you try again with the
format:
ui->line_edit_font1->setInputMask("HHHHHH");
Didn't know there was an input mask for hexes already existing
|
|
2010-09-30
, 13:09
|
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#156
|
So you want to revert to original value in the text lenght is < 7 ?
You can use focusInEvent to save the original text in a qstring and focusOutEvent to revert.
|
|
2010-09-30
, 13:24
|
|
Posts: 16 |
Thanked: 18 times |
Joined on Sep 2010
|
#157
|
|
|
2010-09-30
, 13:49
|
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#158
|
#ifndef MYLINEEDIT_H
#define MYLINEEDIT_H
#include <QLineEdit>
class MyLineEdit : public QLineEdit
{
Q_OBJECT
public:
MyLineEdit(QWidget *parent = 0);
protected:
void focusOutEvent(QFocusEvent *event);
void focusInEvent(QFocusEvent *event);
};
#endif // MYLINEEDIT_H
#include "mylineedit.h"
MyLineEdit::MyLineEdit(QWidget *parent) :
QLineEdit(parent)
{
}
void MyLineEdit::focusInEvent(QFocusEvent *event)
{
//Save text from line edit
}
void MyLineEdit::focusOutEvent(QFocusEvent *event)
{
//Restore text if it is not valid
}
| The Following User Says Thank You to Diph For This Useful Post: | ||
|
|
2010-10-01
, 22:14
|
|
|
Posts: 199 |
Thanked: 156 times |
Joined on May 2010
@ Holland
|
#159
|
Install lib in scratchbox armel target and make links of gconf lib and include files under usr and place them in NokiaQtSDK Maemo usr/lib and usr/include.
|
|
2010-10-02
, 00:24
|
|
|
Posts: 199 |
Thanked: 156 times |
Joined on May 2010
@ Holland
|
#160
|


system("gconftool-2 -R /apps/osso/hildon-desktop/views");
current = 1 active = [1,2,3,4] /apps/osso/hildon-desktop/views/1: bg-image = /home/user/MyDocs/.images/abstract1_01.jpg /apps/osso/hildon-desktop/views/2: bg-image = /home/user/MyDocs/.images/abstract1_02.jpg /apps/osso/hildon-desktop/views/3: bg-image = /home/user/MyDocs/.images/abstract1_03.jpg /apps/osso/hildon-desktop/views/4: bg-image = /home/user/MyDocs/.images/abstract1_04.jpg
system('gconftool -s /apps/osso/hildon-desktop/views/1/bg-image -t string "/home/user/MyDocs/.images/abstract1_01.jpg"');
| The Following User Says Thank You to Berserk For This Useful Post: | ||
Reimplement void QLineEdit::focusOutEvent ( QFocusEvent * e ) and check what QLineEdit::validator()::validate() returns.