PDA

View Full Version : Creating simple text editor from the eamples code



overcast
11th February 2007, 06:16
I'm trying to create simple text editor using the QT.I have created simple one with menus now i want to add some functionality to improve it like these:

1.Add tabs at bottom to allow user to open multiple files

2.Syntax highlight

3.Line counting colum & Line highlight when cursor is pressed on line

is there anyway i can do this?

Also when text editor from the sample eample created it shows blank window at the left top of the winow.How can i change that icon to display something else,is it possible to change that?

aamer4yu
11th February 2007, 06:37
1.Add tabs at bottom to allow user to open multiple files
U can use QTabWidget for this.


2.Syntax highlight
Refer to syntax highlighter demo in Qt Demos


3.Line counting colum & Line highlight when cursor is pressed on line

not sure of this right now... :(

overcast
13th February 2007, 14:51
Thanks i will look into that,do you have any idea.?How can i create color pallete in order to find & put the HEX value of each color in the TextBox,so that user can use the Hex value in thier designs.This is just concept in order to get the text editor working.

aamer4yu
14th February 2007, 04:01
are u looking for changing the color of the text ??
U can use QColorDialog to choose color from....
or didnt i understand you properly ??

overcast
14th February 2007, 15:46
are u looking for changing the color of the text ??
U can use QColorDialog to choose color from....
or didnt i understand you properly ??

Right you ar trying to tell me to change the color of the text,what i'm trying to create is the to generate the hex valur of the color in the "Textedit dialog box" when the color from the pallete is selected.

Another question i have is take a look at this image:
http://www.flickr.com/photos/90012285@N00/390217870/

http://www.flickr.com/photos/90012285@N00/390217870/
Problems i have :

Number 1:
i've created the notepad from the example but the icon of the app at the left top is diffrent.How can i change the icon for that as well as for the .exe also?

Number 2:
The notepad has some space for the icons for the cut/copy/paste,below it i want to add the tabtoolbar? How can i do that?