English | Magyar
JS ki | CSS ki | Ékezetek ki | HiContrast
Lapozó:  (0 - 1424) 
<== | ==>
Ugrás a végére | Összes megjelenítése | Utolsó oldal
OpenOpera patches | Opera-SSL patches | Opera 12.15 source (Git repository) | Opera 12.15 source (Torrent) | Opera internal pages | Otter Browser Linux x64 - Qt5.15.2/QtWebKit5.602.1 (2024.04.27. 20:05)
OS for MC680x0 | OS for PPC | OS for Sparc64 | besztofbégéaefcé | CSÉNDZSLOG | WebToolz | DDG Shit Filter | Google Shit Filter | Progz | Fast CSS Box | Browser | OS | Agent | Statisztika | BBCode
Monospace font-family: Courier New | Browser default monospace
Email értesítő / Email notification ===> 
Keresés
Σ: 1 post

kemi  (statz) Főfasz
#2, Főfasz (2970)
2590 | #241a | ^ | Idézet | Wed, 06 Mar 2013 07:34:22 +01
92.249.*.* Linux x86 Google Chrome Hungary *.pool.digikabel.hu
@TCH:
Viszont, meg tudnád mutatni, hogy hogy néz ki Pythonban és C++-ban a következő cucc? Egy sima ablak, benne egy gomb, meg egy szövegmező és ha a gombra nyomsz, akkor a szövegmezőbe beírja, hogy kecske. Csak mert kiváncsi vagyok, hogy mennyivel rázósabb ezt C++-ban tolni, mint Pythonban. Mert, ha nem, akkor imho fasság bármit kitalálni a C++ helyett.


GTK vs Qt ugyanezen a példán

GTK:
#include <gtkmm.h>

using namespace std;
using namespace Gtk;
using namespace Glib;

Window* window;
Button* button;
Entry*  entry;

void on_button_clicked() {
	entry->set_text("kecske");
}

int main(int argc, char* argv[]) {
	Main app(argc, argv);
	RefPtr<Builder> builder = Builder::create_from_file("kecske.glade");

	builder->get_widget("window", window);
	builder->get_widget("entry", entry);
	builder->get_widget("button", button);

	button->signal_clicked().connect(sigc::ptr_fun(on_button_clicked));

	app.run(*window);

	return 0;
}


Qt:

main.cpp
#include <QApplication>
#include "mainwindow.h"

int main(int argc, char *argv[]) {
    QApplication a(argc, argv);
    MainWindow w;
    w.show();
    
    return a.exec();
}


mainwindow.h
#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();
    
private slots:
    void on_pushButton_clicked();
    
private:
    Ui::MainWindow *ui;
};

#endif // MAINWINDOW_H


mainwindow.cpp
#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow) {
    ui->setupUi(this);
}

MainWindow::~MainWindow() {
    delete ui;
}

void MainWindow::on_pushButton_clicked() {
    ui->lineEdit->setText("kecske");
}


A Qt-s verzió több kód, de most, hogy kipróbáltam annyira nem is gáz a QtCreator IDE, szemben a GTK-s eszközökkel (a Glade GUI szerkesztő egy trágya).
@TCH:
http://index.hu/tech/2013/02/28/kemgepek_lettek_az_internetszolgaltatok/
Szokásos bigbráner sztori újabb epizódja amerikában.
Elbukott a SOPAtás, és most így próbálják mégis érvényre juttatni.
@TCH:
Tud valaki egyetlen olyan együttest mondani, akinek valamelyik albuma 50 millió forintba került a boltokban?
Őket az nem érdekli, csak minél jobban meg tudjanak vágni, és minél több pénz üsse a markukat.


English | Magyar
JS ki | CSS ki | Ékezetek ki | HiContrast
Lapozó:  (0 - 1424) 
<== | ==>
Ugrás a végére | Összes megjelenítése | Utolsó oldal
OpenOpera patches | Opera-SSL patches | Opera 12.15 source (Git repository) | Opera 12.15 source (Torrent) | Opera internal pages | Otter Browser Linux x64 - Qt5.15.2/QtWebKit5.602.1 (2024.04.27. 20:05)
OS for MC680x0 | OS for PPC | OS for Sparc64 | besztofbégéaefcé | CSÉNDZSLOG | WebToolz | DDG Shit Filter | Google Shit Filter | Progz | Fast CSS Box | Browser | OS | Agent | Statisztika | BBCode
Monospace font-family: Courier New | Browser default monospace
Email értesítő / Email notification ===> 
Keresés

Név: (max 255 byte)

Email: (max 255 byte) Nem kötelező!

Üzenet: (max 65536 kar.) 65536-0=65536




crap_vkn v4.34.0 by TCH
Thx to saxus for the escaped string decoder function (PHP), the realIP function (PHP) & the SQL handle layer (PHP), to thookerov for the int_divide function (PHP), to Jeff Anderson for the getSelText function (JS), to Alex King for the insertAtCursor function (JS), Flood3r for the new CSS styles, Pety for the spamprotection idea and some design and comfort ideas, MaxMind for the IP2Country database, famfamfam for the flags of countries and an unknown PHP programmer for the removeAccents function.



Kecskebaszók ide!