Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Qt

Name: Anonymous 2008-09-16 13:28

Hey /prog/ , I'm learning C++ and Qt and I'm already stuck with something simple. I'm trying to do a basic window with a QLineEdit and a QLabel, in such way that when I type something in the LineEdit field, it will show up in the QLabel whenever I type a character. This is easy and I've already done it, but here's the hard (for me) part.

I'm trying to modify it so when I type something, the even characters will be lower-case and the odd characters will be upper-case. The way I've been told to do it is to make a new class inheriting QLabel and make a new method based on what setText does. However, I suck at programming and I'm stuck at this step. This is my header file so far (sorry, I can't highlight code):

#include <QLabel>

class MyQLabel : public QLabel
{

    Q_OBJECT

    public:
        MyQLabel();

    signals:

    private:


};

As you can see, it's empty :c . Will /prog/ please fill in the blanks as to make it work so that if in my main code I exchange a QLabel declaration by a MyQLabel one it will work?

I also wouldn't mind tips on the setText function, but right now I'm just trying to make the class work.

Name: Anonymous 2008-09-16 13:29


     | \
     |Д`)   No one is here.
     |⊂     I can dance now !
     |

     ♪  ☆
   ♪   / \    RANTA TAN
      ヽ(´Д`;)ノ   RANTA TAN
         (  へ)    RANTA RANTA
          く       TAN

   ♪    ☆
     ♪ / \   RANTA RANTA
      ヽ(;´Д`)ノ  RANTA TAN
         (へ  )    RANTA T-T-T-T-
             >    TTTTTTTTTTT

Name: Anonymous 2008-09-16 13:37

>>2 NO EXCEPTIONS

Name: Anonymous 2008-09-16 13:53

zipWith ($) (cycle [Data.Char.toLower,Data.Char.toUpper]) "My other car is a cdr"

Name: Anonymous 2008-09-16 14:02

>>2
this is not /dqn/

Name: Flea Turd Operator 2008-09-16 14:12

>>5

     | \
     |Д`)   Are you
     |⊂    sure?
     |

Name: Anonymous 2008-09-16 14:29

this is not /dqn/

Name: Anonymous 2008-09-16 15:04

So, can anyone help me out?

Name: Anonymous 2008-09-16 15:33

>>8
No, but you can read the fucking manual:
http://doc.trolltech.com/

Name: Anonymous 2008-09-16 15:48

>>6
If I see that fucking ... thing(?) one more time...

Name: Anonymous 2008-09-16 16:31


     | \
     |Д`)   Then
     |⊂    what?
     |

Name: Anonymous 2008-09-16 16:40

this is not /dqn/

Name: Anonymous 2008-09-16 17:52


     | \
     |Д`)   What is
     |⊂    /dqn/?
     |

Name: Anonymous 2008-09-16 17:59

>>13
not this

Name: Anonymous 2008-09-17 1:20

>>13
A miserable little pile of memes.

Name: Anonymous 2008-09-17 1:48

We have been trolltech'd constantly.

Name: Anonymous 2008-09-17 13:19


          / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
          | We have been trolled!
          \_  ______
             ∨
                        / ̄ ̄ ̄ ̄ ̄ ̄ ̄
            ∧_∧        | OMG!
           ( ´∀`)       /へ._______
           (    っ-~ ∧ ∧
      ∧_∧-ニニニニニニニ─、(゚Д゚;)
     ( ・∀・ )        ヽ⊂  ヽ
     (    つヽ、    ∧_∧\ ノ~
      し__) \  ニニ(    ). \    / ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄
            || ̄ ̄ (    ) ̄||   < NO WAY!
                (__○ノ       \________
       ∧
    / ̄   ̄ ̄ ̄ ̄ ̄ ̄
    | Come, Anonymous. Let's troll together.
    \________

Name: Anonymous 2008-09-17 13:38

>>1
Just use Swing already.

Name: Anonymous 2009-08-16 23:48

Lain.

Name: Anonymous 2010-11-25 8:36

Name: Anonymous 2010-12-17 1:29

Xarn is a bad boyfriend

Name: Anonymous 2011-01-31 19:59

<-- check em dubz

Don't change these.
Name: Email:
Entire Thread Thread List