Commit d96add39 authored by Doug Beney's avatar Doug Beney

Fixed indentation

parent 89ccd1d7
...@@ -7,28 +7,28 @@ ...@@ -7,28 +7,28 @@
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication a(argc, argv); QApplication a(argc, argv);
// Create a layout and two buttons // Create a layout and two buttons
QVBoxLayout *l = new QVBoxLayout; QVBoxLayout *l = new QVBoxLayout;
QPushButton *b1 = new QPushButton("Button 1"); QPushButton *b1 = new QPushButton("Button 1");
QPushButton *b2 = new QPushButton("Button 2"); QPushButton *b2 = new QPushButton("Button 2");
l->addWidget( b1 ); l->addWidget( b1 );
l->addWidget( b2 ); l->addWidget( b2 );
// OPTIONAL: Set your own icon pack. By default, Qt will search in :icons/ // OPTIONAL: Set your own icon pack. By default, Qt will search in :icons/
QIcon::setThemeName( "zafiro" ); QIcon::setThemeName( "zafiro" );
// If we request an icon that is not found in the icon pack, search in the :custom-icons folder. // If we request an icon that is not found in the icon pack, search in the :custom-icons folder.
QIcon::setFallbackSearchPaths(QIcon::fallbackSearchPaths() << ":custom-icons"); QIcon::setFallbackSearchPaths(QIcon::fallbackSearchPaths() << ":custom-icons");
// Set icons from theme // Set icons from theme
b1->setIcon( QIcon::fromTheme("folder-alt") ); // Most Linux icon packs will have a "battery" icon. b1->setIcon( QIcon::fromTheme("folder-alt") ); // Most Linux icon packs will have a "battery" icon.
b2->setIcon( QIcon::fromTheme("open-app-library") ); // If this does not exist in icon pack (It won't), it will search :custom-icons/ b2->setIcon( QIcon::fromTheme("open-app-library") ); // If this does not exist in icon pack (It won't), it will search :custom-icons/
// Create a frame that uses layout and show widgets // Create a frame that uses layout and show widgets
QFrame *f = new QFrame; QFrame *f = new QFrame;
f->setLayout(l); f->setLayout(l);
f->show(); f->show();
return a.exec(); return a.exec();
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment