![]() |
2010-07-21
, 09:29
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#82
|
void MainWindow::writeSettings() { QSettings sett("blackplastic-theme/config"); sett.setValue("color", ui->Color->currentText()); sett.setValue("transitions", ui->Transition->currentText()); } void MainWindow::readSettings() { QSettings sett("blackplastic-theme/config"); // bool OK; QString color = sett.value("color", QVariant("")).toString(); QString transitions = sett.value("transitions", QVariant("")).toString(); ui->Color->setCurrentText(color); ui->Transition->setCurrentText(transitions); }
![]() |
2010-07-21
, 10:40
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#83
|
![]() |
2010-07-21
, 11:34
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#84
|
![]() |
2010-08-02
, 09:58
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#85
|
![]() |
2010-08-02
, 10:47
|
Posts: 353 |
Thanked: 263 times |
Joined on Dec 2009
@ Finland
|
#86
|
Once again I need to ask for some assistance :P
Now I've ran out of space on my program and I'd like to expand the content area and make it scrollable (kinetic scrolling with finger). I found this, but cannot find that widget (QAbstractScrollArea) from QT Creator:
http://wiki.maemo.org/Qt/Finger_Scrolling
![]() |
2010-08-02
, 12:22
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#87
|
I think you can use QScrollArea (which should be available in Designer, named Scroll Area) instead of QAbstractScrollArea.
![]() |
2010-08-02
, 12:28
|
Posts: 353 |
Thanked: 263 times |
Joined on Dec 2009
@ Finland
|
#88
|
I tried to use it but couldn't get it scrolling
I dragged the scrollarea to mainwindow, resized it to fill almost the whole mainwindow and then cut + pasted my elements inside of it, but the damn area won't scroll even the elements goes below the scrollarea. I also tried to scretch the scrollarea to be longer than my mainwindow but still didn't scroll.
ui->yourScrollArea->setWidget(ui->yourWidget);
![]() |
2010-08-02
, 12:32
|
|
Posts: 2,154 |
Thanked: 2,186 times |
Joined on Dec 2009
@ Hellsinki, Finland
|
#89
|
I haven't used scrollarea myself never, but according to Qt's manual I think you need to insert an empty widget in the scroll area and your other elements in the widget and then in MainWindow's constructor do this:
Code:ui->yourScrollArea->setWidget(yourWidget);
![]() |
2010-08-02
, 12:35
|
Posts: 353 |
Thanked: 263 times |
Joined on Dec 2009
@ Finland
|
#90
|
The Following User Says Thank You to TNiga For This Useful Post: | ||
If you're rich and you think I deserve a cold beer, you may donate one or two :-P
80's style stadium rock is back - FIRENOTE
Hi-Octane heavy metal - FORCE MAJEURE