A<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.cppe.ru/index.php?action=history&amp;feed=atom&amp;title=C%2B%2B%2FQt%2FQGroupBox</id>
		<title>C++/Qt/QGroupBox - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.cppe.ru/index.php?action=history&amp;feed=atom&amp;title=C%2B%2B%2FQt%2FQGroupBox"/>
		<link rel="alternate" type="text/html" href="http://www.cppe.ru/index.php?title=C%2B%2B/Qt/QGroupBox&amp;action=history"/>
		<updated>2026-04-18T17:05:00Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.cppe.ru/index.php?title=C%2B%2B/Qt/QGroupBox&amp;diff=1022&amp;oldid=prev</id>
		<title> в 14:21, 25 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.cppe.ru/index.php?title=C%2B%2B/Qt/QGroupBox&amp;diff=1022&amp;oldid=prev"/>
				<updated>2010-05-25T14:21:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 14:21, 25 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.cppe.ru/index.php?title=C%2B%2B/Qt/QGroupBox&amp;diff=1023&amp;oldid=prev</id>
		<title>Admin: 1 версия:&amp;#32;Импорт контента...</title>
		<link rel="alternate" type="text/html" href="http://www.cppe.ru/index.php?title=C%2B%2B/Qt/QGroupBox&amp;diff=1023&amp;oldid=prev"/>
				<updated>2010-05-25T10:24:34Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия: Импорт контента...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Use GroupBox to hold Push buttons==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;  &lt;br /&gt;
/****************************************************************************&lt;br /&gt;
**&lt;br /&gt;
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;br /&gt;
** All rights reserved.&lt;br /&gt;
** Contact: Nokia Corporation (qt-info@nokia.com)&lt;br /&gt;
**&lt;br /&gt;
** This file is part of the documentation of the Qt Toolkit.&lt;br /&gt;
**&lt;br /&gt;
** $QT_BEGIN_LICENSE:LGPL$&lt;br /&gt;
** Commercial Usage&lt;br /&gt;
** Licensees holding valid Qt Commercial licenses may use this file in&lt;br /&gt;
** accordance with the Qt Commercial License Agreement provided with the&lt;br /&gt;
** Software or, alternatively, in accordance with the terms contained in&lt;br /&gt;
** a written agreement between you and Nokia.&lt;br /&gt;
**&lt;br /&gt;
** GNU Lesser General Public License Usage&lt;br /&gt;
** Alternatively, this file may be used under the terms of the GNU Lesser&lt;br /&gt;
** General Public License version 2.1 as published by the Free Software&lt;br /&gt;
** Foundation and appearing in the file LICENSE.LGPL included in the&lt;br /&gt;
** packaging of this file.  Please review the following information to&lt;br /&gt;
** ensure the GNU Lesser General Public License version 2.1 requirements&lt;br /&gt;
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.&lt;br /&gt;
**&lt;br /&gt;
** In addition, as a special exception, Nokia gives you certain additional&lt;br /&gt;
** rights.  These rights are described in the Nokia Qt LGPL Exception&lt;br /&gt;
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.&lt;br /&gt;
**&lt;br /&gt;
** GNU General Public License Usage&lt;br /&gt;
** Alternatively, this file may be used under the terms of the GNU&lt;br /&gt;
** General Public License version 3.0 as published by the Free Software&lt;br /&gt;
** Foundation and appearing in the file LICENSE.GPL included in the&lt;br /&gt;
** packaging of this file.  Please review the following information to&lt;br /&gt;
** ensure the GNU General Public License version 3.0 requirements will be&lt;br /&gt;
** met: http://www.gnu.org/copyleft/gpl.html.&lt;br /&gt;
**&lt;br /&gt;
** If you have questions regarding the use of this file, please contact&lt;br /&gt;
** Nokia at qt-info@nokia.com.&lt;br /&gt;
** $QT_END_LICENSE$&lt;br /&gt;
**&lt;br /&gt;
****************************************************************************/&lt;br /&gt;
#include &amp;lt;QApplication&amp;gt;&lt;br /&gt;
#include &amp;lt;QPushButton&amp;gt;&lt;br /&gt;
#include &amp;lt;QFileInfo&amp;gt;&lt;br /&gt;
#include &amp;lt;QDir&amp;gt;&lt;br /&gt;
#include &amp;lt;QGroupBox&amp;gt;&lt;br /&gt;
#include &amp;lt;QVBoxLayout&amp;gt;&lt;br /&gt;
#include &amp;lt;QDebug&amp;gt;&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    QApplication app(argc, argv);&lt;br /&gt;
    QFileInfo fileInfo1(&amp;quot;~/examples/191697/.&amp;quot;);&lt;br /&gt;
    QFileInfo fileInfo2(&amp;quot;~/examples/191697/..&amp;quot;);&lt;br /&gt;
    QFileInfo fileInfo3(&amp;quot;~/examples/191697/main.cpp&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
    QFileInfo fileInfo4(&amp;quot;.&amp;quot;);&lt;br /&gt;
    QFileInfo fileInfo5(&amp;quot;..&amp;quot;);&lt;br /&gt;
    QFileInfo fileInfo6(&amp;quot;main.cpp&amp;quot;);&lt;br /&gt;
    qDebug() &amp;lt;&amp;lt; fileInfo1.fileName();&lt;br /&gt;
    qDebug() &amp;lt;&amp;lt; fileInfo2.fileName();&lt;br /&gt;
    qDebug() &amp;lt;&amp;lt; fileInfo3.fileName();&lt;br /&gt;
    qDebug() &amp;lt;&amp;lt; fileInfo4.fileName();&lt;br /&gt;
    qDebug() &amp;lt;&amp;lt; fileInfo5.fileName();&lt;br /&gt;
    qDebug() &amp;lt;&amp;lt; fileInfo6.fileName();&lt;br /&gt;
    QPushButton* button1 = new QPushButton(fileInfo1.dir().path());&lt;br /&gt;
    QPushButton* button2 = new QPushButton(fileInfo2.dir().path());&lt;br /&gt;
    QPushButton* button3 = new QPushButton(fileInfo3.dir().path());&lt;br /&gt;
    QPushButton* button4 = new QPushButton(fileInfo4.dir().path());&lt;br /&gt;
    QPushButton* button5 = new QPushButton(fileInfo5.dir().path());&lt;br /&gt;
    QPushButton* button6 = new QPushButton(fileInfo6.dir().path());&lt;br /&gt;
    QVBoxLayout* vbox = new QVBoxLayout;&lt;br /&gt;
    vbox-&amp;gt;addWidget(button1);&lt;br /&gt;
    vbox-&amp;gt;addWidget(button2);&lt;br /&gt;
    vbox-&amp;gt;addWidget(button3);&lt;br /&gt;
    vbox-&amp;gt;addWidget(button4);&lt;br /&gt;
    vbox-&amp;gt;addWidget(button5);&lt;br /&gt;
    vbox-&amp;gt;addWidget(button6);&lt;br /&gt;
    vbox-&amp;gt;addStretch(1);&lt;br /&gt;
    QGroupBox *groupBox = new QGroupBox(&amp;quot;QFileInfo::dir() test&amp;quot;);&lt;br /&gt;
    groupBox-&amp;gt;setLayout(vbox);&lt;br /&gt;
    groupBox-&amp;gt;show();&lt;br /&gt;
    return app.exec();&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Using group box==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;  &lt;br /&gt;
/****************************************************************************&lt;br /&gt;
**&lt;br /&gt;
** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;br /&gt;
** All rights reserved.&lt;br /&gt;
** Contact: Nokia Corporation (qt-info@nokia.com)&lt;br /&gt;
**&lt;br /&gt;
** This file is part of the examples of the Qt Toolkit.&lt;br /&gt;
**&lt;br /&gt;
** $QT_BEGIN_LICENSE:LGPL$&lt;br /&gt;
** Commercial Usage&lt;br /&gt;
** Licensees holding valid Qt Commercial licenses may use this file in&lt;br /&gt;
** accordance with the Qt Commercial License Agreement provided with the&lt;br /&gt;
** Software or, alternatively, in accordance with the terms contained in&lt;br /&gt;
** a written agreement between you and Nokia.&lt;br /&gt;
**&lt;br /&gt;
** GNU Lesser General Public License Usage&lt;br /&gt;
** Alternatively, this file may be used under the terms of the GNU Lesser&lt;br /&gt;
** General Public License version 2.1 as published by the Free Software&lt;br /&gt;
** Foundation and appearing in the file LICENSE.LGPL included in the&lt;br /&gt;
** packaging of this file.  Please review the following information to&lt;br /&gt;
** ensure the GNU Lesser General Public License version 2.1 requirements&lt;br /&gt;
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.&lt;br /&gt;
**&lt;br /&gt;
** In addition, as a special exception, Nokia gives you certain additional&lt;br /&gt;
** rights.  These rights are described in the Nokia Qt LGPL Exception&lt;br /&gt;
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.&lt;br /&gt;
**&lt;br /&gt;
** GNU General Public License Usage&lt;br /&gt;
** Alternatively, this file may be used under the terms of the GNU&lt;br /&gt;
** General Public License version 3.0 as published by the Free Software&lt;br /&gt;
** Foundation and appearing in the file LICENSE.GPL included in the&lt;br /&gt;
** packaging of this file.  Please review the following information to&lt;br /&gt;
** ensure the GNU General Public License version 3.0 requirements will be&lt;br /&gt;
** met: http://www.gnu.org/copyleft/gpl.html.&lt;br /&gt;
**&lt;br /&gt;
** If you have questions regarding the use of this file, please contact&lt;br /&gt;
** Nokia at qt-info@nokia.com.&lt;br /&gt;
** $QT_END_LICENSE$&lt;br /&gt;
**&lt;br /&gt;
****************************************************************************/&lt;br /&gt;
#ifndef WINDOW_H&lt;br /&gt;
#define WINDOW_H&lt;br /&gt;
#include &amp;lt;QWidget&amp;gt;&lt;br /&gt;
QT_BEGIN_NAMESPACE&lt;br /&gt;
class QGroupBox;&lt;br /&gt;
QT_END_NAMESPACE&lt;br /&gt;
&lt;br /&gt;
class Window : public QWidget&lt;br /&gt;
{&lt;br /&gt;
    Q_OBJECT&lt;br /&gt;
public:&lt;br /&gt;
    Window(QWidget *parent = 0);&lt;br /&gt;
private:&lt;br /&gt;
    QGroupBox *createFirstExclusiveGroup();&lt;br /&gt;
    QGroupBox *createSecondExclusiveGroup();&lt;br /&gt;
    QGroupBox *createNonExclusiveGroup();&lt;br /&gt;
    QGroupBox *createPushButtonGroup();&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
#endif&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QtGui&amp;gt;&lt;br /&gt;
#include &amp;quot;window.h&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Window::Window(QWidget *parent)&lt;br /&gt;
    : QWidget(parent)&lt;br /&gt;
{&lt;br /&gt;
    QGridLayout *grid = new QGridLayout;&lt;br /&gt;
    grid-&amp;gt;addWidget(createFirstExclusiveGroup(), 0, 0);&lt;br /&gt;
    grid-&amp;gt;addWidget(createSecondExclusiveGroup(), 1, 0);&lt;br /&gt;
    grid-&amp;gt;addWidget(createNonExclusiveGroup(), 0, 1);&lt;br /&gt;
    grid-&amp;gt;addWidget(createPushButtonGroup(), 1, 1);&lt;br /&gt;
    setLayout(grid);&lt;br /&gt;
    setWindowTitle(tr(&amp;quot;Group Boxes&amp;quot;));&lt;br /&gt;
    resize(480, 320);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
QGroupBox *Window::createFirstExclusiveGroup()&lt;br /&gt;
{&lt;br /&gt;
    QGroupBox *groupBox = new QGroupBox(tr(&amp;quot;Exclusive Radio Buttons&amp;quot;));&lt;br /&gt;
    QRadioButton *radio1 = new QRadioButton(tr(&amp;quot;&amp;amp;Radio button 1&amp;quot;));&lt;br /&gt;
    QRadioButton *radio2 = new QRadioButton(tr(&amp;quot;R&amp;amp;adio button 2&amp;quot;));&lt;br /&gt;
    QRadioButton *radio3 = new QRadioButton(tr(&amp;quot;Ra&amp;amp;dio button 3&amp;quot;));&lt;br /&gt;
    radio1-&amp;gt;setChecked(true);&lt;br /&gt;
 &lt;br /&gt;
    QVBoxLayout *vbox = new QVBoxLayout;&lt;br /&gt;
    vbox-&amp;gt;addWidget(radio1);&lt;br /&gt;
    vbox-&amp;gt;addWidget(radio2);&lt;br /&gt;
    vbox-&amp;gt;addWidget(radio3);&lt;br /&gt;
    vbox-&amp;gt;addStretch(1);&lt;br /&gt;
    groupBox-&amp;gt;setLayout(vbox);&lt;br /&gt;
&lt;br /&gt;
    return groupBox;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
QGroupBox *Window::createSecondExclusiveGroup()&lt;br /&gt;
{&lt;br /&gt;
    QGroupBox *groupBox = new QGroupBox(tr(&amp;quot;E&amp;amp;xclusive Radio Buttons&amp;quot;));&lt;br /&gt;
    groupBox-&amp;gt;setCheckable(true);&lt;br /&gt;
    groupBox-&amp;gt;setChecked(false);&lt;br /&gt;
&lt;br /&gt;
    QRadioButton *radio1 = new QRadioButton(tr(&amp;quot;Rad&amp;amp;io button 1&amp;quot;));&lt;br /&gt;
    QRadioButton *radio2 = new QRadioButton(tr(&amp;quot;Radi&amp;amp;o button 2&amp;quot;));&lt;br /&gt;
    QRadioButton *radio3 = new QRadioButton(tr(&amp;quot;Radio &amp;amp;button 3&amp;quot;));&lt;br /&gt;
    radio1-&amp;gt;setChecked(true);&lt;br /&gt;
    QCheckBox *checkBox = new QCheckBox(tr(&amp;quot;Ind&amp;amp;ependent checkbox&amp;quot;));&lt;br /&gt;
    checkBox-&amp;gt;setChecked(true);&lt;br /&gt;
&lt;br /&gt;
    QVBoxLayout *vbox = new QVBoxLayout;&lt;br /&gt;
    vbox-&amp;gt;addWidget(radio1);&lt;br /&gt;
    vbox-&amp;gt;addWidget(radio2);&lt;br /&gt;
    vbox-&amp;gt;addWidget(radio3);&lt;br /&gt;
    vbox-&amp;gt;addWidget(checkBox);&lt;br /&gt;
    vbox-&amp;gt;addStretch(1);&lt;br /&gt;
    groupBox-&amp;gt;setLayout(vbox);&lt;br /&gt;
    return groupBox;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
QGroupBox *Window::createNonExclusiveGroup()&lt;br /&gt;
{&lt;br /&gt;
    QGroupBox *groupBox = new QGroupBox(tr(&amp;quot;Non-Exclusive Checkboxes&amp;quot;));&lt;br /&gt;
    groupBox-&amp;gt;setFlat(true);&lt;br /&gt;
&lt;br /&gt;
    QCheckBox *checkBox1 = new QCheckBox(tr(&amp;quot;&amp;amp;Checkbox 1&amp;quot;));&lt;br /&gt;
    QCheckBox *checkBox2 = new QCheckBox(tr(&amp;quot;C&amp;amp;heckbox 2&amp;quot;));&lt;br /&gt;
    checkBox2-&amp;gt;setChecked(true);&lt;br /&gt;
    QCheckBox *tristateBox = new QCheckBox(tr(&amp;quot;Tri-&amp;amp;state button&amp;quot;));&lt;br /&gt;
    tristateBox-&amp;gt;setTristate(true);&lt;br /&gt;
    tristateBox-&amp;gt;setCheckState(Qt::PartiallyChecked);&lt;br /&gt;
&lt;br /&gt;
    QVBoxLayout *vbox = new QVBoxLayout;&lt;br /&gt;
    vbox-&amp;gt;addWidget(checkBox1);&lt;br /&gt;
    vbox-&amp;gt;addWidget(checkBox2);&lt;br /&gt;
    vbox-&amp;gt;addWidget(tristateBox);&lt;br /&gt;
    vbox-&amp;gt;addStretch(1);&lt;br /&gt;
    groupBox-&amp;gt;setLayout(vbox);&lt;br /&gt;
    return groupBox;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
QGroupBox *Window::createPushButtonGroup()&lt;br /&gt;
{&lt;br /&gt;
    QGroupBox *groupBox = new QGroupBox(tr(&amp;quot;&amp;amp;Push Buttons&amp;quot;));&lt;br /&gt;
    groupBox-&amp;gt;setCheckable(true);&lt;br /&gt;
    groupBox-&amp;gt;setChecked(true);&lt;br /&gt;
&lt;br /&gt;
    QPushButton *pushButton = new QPushButton(tr(&amp;quot;&amp;amp;Normal Button&amp;quot;));&lt;br /&gt;
    QPushButton *toggleButton = new QPushButton(tr(&amp;quot;&amp;amp;Toggle Button&amp;quot;));&lt;br /&gt;
    toggleButton-&amp;gt;setCheckable(true);&lt;br /&gt;
    toggleButton-&amp;gt;setChecked(true);&lt;br /&gt;
    QPushButton *flatButton = new QPushButton(tr(&amp;quot;&amp;amp;Flat Button&amp;quot;));&lt;br /&gt;
    flatButton-&amp;gt;setFlat(true);&lt;br /&gt;
&lt;br /&gt;
    QPushButton *popupButton = new QPushButton(tr(&amp;quot;Pop&amp;amp;up Button&amp;quot;));&lt;br /&gt;
    QMenu *menu = new QMenu(this);&lt;br /&gt;
    menu-&amp;gt;addAction(tr(&amp;quot;&amp;amp;First Item&amp;quot;));&lt;br /&gt;
    menu-&amp;gt;addAction(tr(&amp;quot;&amp;amp;Second Item&amp;quot;));&lt;br /&gt;
    menu-&amp;gt;addAction(tr(&amp;quot;&amp;amp;Third Item&amp;quot;));&lt;br /&gt;
    menu-&amp;gt;addAction(tr(&amp;quot;F&amp;amp;ourth Item&amp;quot;));&lt;br /&gt;
    popupButton-&amp;gt;setMenu(menu);&lt;br /&gt;
&lt;br /&gt;
    QAction *newAction = menu-&amp;gt;addAction(tr(&amp;quot;Submenu&amp;quot;));&lt;br /&gt;
    QMenu *subMenu = new QMenu(tr(&amp;quot;Popup Submenu&amp;quot;));&lt;br /&gt;
    subMenu-&amp;gt;addAction(tr(&amp;quot;Item 1&amp;quot;));&lt;br /&gt;
    subMenu-&amp;gt;addAction(tr(&amp;quot;Item 2&amp;quot;));&lt;br /&gt;
    subMenu-&amp;gt;addAction(tr(&amp;quot;Item 3&amp;quot;));&lt;br /&gt;
    newAction-&amp;gt;setMenu(subMenu);&lt;br /&gt;
&lt;br /&gt;
    QVBoxLayout *vbox = new QVBoxLayout;&lt;br /&gt;
    vbox-&amp;gt;addWidget(pushButton);&lt;br /&gt;
    vbox-&amp;gt;addWidget(toggleButton);&lt;br /&gt;
    vbox-&amp;gt;addWidget(flatButton);&lt;br /&gt;
    vbox-&amp;gt;addWidget(popupButton);&lt;br /&gt;
    vbox-&amp;gt;addStretch(1);&lt;br /&gt;
    groupBox-&amp;gt;setLayout(vbox);&lt;br /&gt;
    return groupBox;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#include &amp;lt;QApplication&amp;gt;&lt;br /&gt;
#include &amp;quot;window.h&amp;quot;&lt;br /&gt;
int main(int argc, char *argv[])&lt;br /&gt;
{&lt;br /&gt;
    QApplication app(argc, argv);&lt;br /&gt;
    Window window;&lt;br /&gt;
    window.show();&lt;br /&gt;
    return app.exec();&lt;br /&gt;
}&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>