May 4, 2012

harward harward
Lab Rat
7 posts

how format a c like codes and ...

 

hi
i have a code editor

  1. how i can format (make beautiful & indent blocks) c/c++ language source codes i have an algorithm that i check line by line but this take a huge proccess in above 2000 line of code; do you have a good algorithm like vc++ code formatter (formatting code as soon as possible). please help me and give me a solution
  2. how i can add close button in tabwidget specially in Mdi apps
  3. docktWidget in qt have two button as default float and close button how can i add auto hide button or ability to this widget

this is my generall question and problem please help me i’m waitin to your answer

8 replies

May 4, 2012

sierdzio sierdzio
Area 51 Engineer
4648 posts

You are aware of punctuation? Please use it, your post is very hard to read and understand.

I’m a bit busy at the moment, so just a quick answer to 2nd question:
To make tabs closable, you can use QTabWidget::setTabsClosable() [qt-project.org].

 Signature 

(Z(:^

May 4, 2012

Andre Andre
Robot Herder
6394 posts

First of all: welcome to DevNet!
I have re-formatted your question a little to make it a bit more readable. Please do that yourself next time. Also, it would be better if next time, you post multiple (unrelated) questions, please post them as separate questions. For instance, your question of code highlighting as nothing to do with manipulating tab widgets or dock widgets.

Code formatting is not a trivial thing to do, but fortunately, there is a great open source example available: Qt Creator! As you may or may not have noticed, it works quite snappy.

May 18, 2012

harward harward
Lab Rat
7 posts

my project is commerical ,Is Qt Creator free

May 18, 2012

1+1=2 1+1=2
Hobby Entomologist
638 posts
harward wrote:
my project is commerical ,Is Qt Creator free

Sorry for my poor English, I can’t catch up with you. Does a project is commercial or not have anything to do with a IDE such as Qt Creator, Visual Studio, Ellipse, etc. ?

May 18, 2012

MuldeR MuldeR
Robot Herder
796 posts
1+1=2 wrote:
harward wrote:
my project is commerical ,Is Qt Creator free

Sorry for my poor English, I can’t catch up with you. Does a project is commercial or not have anything to do with a IDE such as Qt Creator, Visual Studio, Ellipse, etc. ?

Depends on the individual IDE and the license it is released under.

Visual Studio, for example, has a free “Express” edition that is allowed to be used for commercial products, although you can’t install any add-in’s with that edition and it is lacking some of the “enterprise” features. On the other hand there are IDE’s that do not allow commercial usage, most notably the “Starter” edition of Embarcadero’s Delphi. Qt Creator is released under the GNU Lesser General Public License v2.1, which means you can use it for free and for any purpose (including commercial purposes). Though it should be mentioned that if you want to use the Qt Framework (and thus the Qt Libraries) in a commercial application, you may need to acquire a commercial Qt license – depending on how you want to link the libraries to your application…

 Signature 

My OpenSource software at: http://muldersoft.com/

Qt v4.8.6 MSVC 2013, static/shared: http://goo.gl/BXqhrS

Go visit the coop: http://youtu.be/Jay-fG9eaYk

May 19, 2012

Wilk Wilk
Lab Rat
120 posts

Hello.
For some information about how to make QDockWidget to hide read this post [qt-project.org]. And work a bit yourself to make it auto hide.

May 25, 2012

harward harward
Lab Rat
7 posts

hi my dears
infact,i want create an ide for PHP by Qt;how i can format (make beautiful & indent code blocks) in QPlainTextEdit

May 25, 2012

sierdzio sierdzio
Area 51 Engineer
4648 posts

You won’t like that, but: take a look at QtCreator and Kate sources :)

 Signature 

(Z(:^

 
  ‹‹ mapToSceneDistance() needed?      Display problem with QCheckBox ››

You must log in to post a reply. Not a member yet? Register here!