智手移动中文网's Archiver

sunmoon 发表于 2006-3-26 20:47

Qt3与Qt4使用的感觉

我认为Qt3 for windows 与 Qt3 for SUN unix 代码通用非常好,而Qt4这方面就不太好。

/****************************************************************************
** Form implementation generated from reading ui file 'registerWindow.ui'
**
** Created: Fri Dec 30 16:09:30 2005
**      by: The User Interface Compiler ($Id: qt/main.cpp   3.1.2   edited Dec 19 11:45 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/

#include "registerWindow.h"

#include <qvariant.h>
#include <qlabel.h>
#include <qpushbutton.h>
#include <qlineedit.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.h>

#include "registerWindow.ui.h"
/*
*  Constructs a Encrypt as a child of 'parent', with the
*  name 'name' and widget flags set to 'f'.
*
*  The dialog will by default be modeless, unless you set 'modal' to
*  TRUE to construct a modal dialog.
*/
Encrypt::Encrypt( QWidget* parent, const char* name, bool modal, WFlags fl )
    : QDialog( parent, name, modal, fl )
{
    if ( !name )
setName( "Encrypt" );

    textLabel1_2 = new QLabel( this, "textLabel1_2" );
    textLabel1_2->setGeometry( QRect( 40, 110, 60, 30 ) );

    textLabel1_3 = new QLabel( this, "textLabel1_3" );
    textLabel1_3->setGeometry( QRect( 20, 170, 61, 30 ) );

    textLabel1 = new QLabel( this, "textLabel1" );
    textLabel1->setGeometry( QRect( 20, 50, 80, 30 ) );

    pushButtonVertUserID = new QPushButton( this, "pushButtonVertUserID" );
    pushButtonVertUserID->setGeometry( QRect( 311, 41, 120, 40 ) );

    pushButtonVertRegisterID = new QPushButton( this, "pushButtonVertRegisterID" );
    pushButtonVertRegisterID->setGeometry( QRect( 311, 101, 120, 40 ) );

    pushButtonCmpFile = new QPushButton( this, "pushButtonCmpFile" );
    pushButtonCmpFile->setGeometry( QRect( 311, 161, 120, 40 ) );

    pushButtonSaveToFile = new QPushButton( this, "pushButtonSaveToFile" );
    pushButtonSaveToFile->setGeometry( QRect( 90, 250, 120, 40 ) );

    pushButtonExit = new QPushButton( this, "pushButtonExit" );
    pushButtonExit->setGeometry( QRect( 260, 250, 120, 40 ) );

    lineEditComputerID = new QLineEdit( this, "lineEditComputerID" );
    lineEditComputerID->setGeometry( QRect( 110, 50, 170, 30 ) );

    lineEditUserID = new QLineEdit( this, "lineEditUserID" );
    lineEditUserID->setGeometry( QRect( 110, 110, 170, 30 ) );

    lineEditRegisterID = new QLineEdit( this, "lineEditRegisterID" );
    lineEditRegisterID->setGeometry( QRect( 110, 170, 170, 30 ) );
    languageChange();
    resize( QSize(476, 340).expandedTo(minimumSizeHint()) );
    clearWState( WState_Polished );

    // signals and slots connections
    connect( pushButtonVertUserID, SIGNAL( clicked() ), this, SLOT( pushButtonVertUserID_clicked() ) );
    connect( pushButtonVertRegisterID, SIGNAL( clicked() ), this, SLOT( pushButtonVertRegisterID_clicked() ) );
    connect( pushButtonCmpFile, SIGNAL( clicked() ), this, SLOT( pushButtonCmpFile_clicked() ) );
    connect( pushButtonSaveToFile, SIGNAL( clicked() ), this, SLOT( pushButtonSaveToFile_clicked() ) );
    connect( pushButtonExit, SIGNAL( clicked() ), this, SLOT( pushButtonExit_clicked() ) );
    connect( this, SIGNAL( destroyed(QObject*) ), this, SLOT( Encrypt_destroyed(QObject*) ) );
    init();
}

/*
*  Destroys the object and frees any allocated resources
*/
Encrypt::~Encrypt()
{
    // no need to delete child widgets, Qt does it all for us
}

/*
*  Sets the strings of the subwidgets using the current
*  language.
*/
void Encrypt::languageChange()
{
    setCaption( tr( "Register Window" ) );
    textLabel1_2->setText( tr( "UserID" ) );
    textLabel1_3->setText( tr( "RegisterID" ) );
    textLabel1->setText( tr( "ComputerID" ) );
    pushButtonVertUserID->setText( tr( "Vert UserID" ) );
    pushButtonVertRegisterID->setText( tr( "Vert RegisterID" ) );
    pushButtonCmpFile->setText( tr( "CompareFile" ) );
    pushButtonSaveToFile->setText( tr( "SaveToFile" ) );
    pushButtonExit->setText( tr( "Exit" ) );
}

王建波 发表于 2007-6-28 08:25

真的好用`````````````

amshine 发表于 2007-9-13 16:09

学东西,谢谢楼主,帮顶

灵3灏 发表于 2008-9-26 13:42

免费外挂网,各种外挂请登陆 www.cq521.com,外挂我爱 ,速度超快!

免费外挂网,各种外挂请登陆 [url=http://www.cq521.com]www.cq521.com[/url],外挂我爱 ,速度超快!

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.