![]() |
2010-09-27
, 08:31
|
Posts: 5 |
Thanked: 1 time |
Joined on Sep 2010
|
#2
|
The Following User Says Thank You to Tetsuo6995 For This Useful Post: | ||
![]() |
2010-09-27
, 08:40
|
|
Posts: 199 |
Thanked: 156 times |
Joined on May 2010
@ Holland
|
#3
|
![]() |
2010-09-27
, 14:57
|
Posts: 180 |
Thanked: 76 times |
Joined on May 2010
|
#4
|
The Following User Says Thank You to Diph For This Useful Post: | ||
![]() |
2010-09-27
, 16:28
|
|
Posts: 199 |
Thanked: 156 times |
Joined on May 2010
@ Holland
|
#5
|
itemList.append(new QListWidgetItem(QIcon(imageSetList[i][1]), QFileInfo(imageSetList[i][0]).fileName(), ui->fileList));
void wallPaeper::manBtnClicked() { manWin = new wpManager(this); manWin->setAttribute(Qt::WA_Maemo5StackedWindow); manWin->setAttribute(Qt::WA_DeleteOnClose); manWin->show(); }
![]() |
2010-09-27
, 16:56
|
|
Posts: 199 |
Thanked: 156 times |
Joined on May 2010
@ Holland
|
#6
|
![]() |
2010-09-27
, 18:59
|
|
Posts: 199 |
Thanked: 156 times |
Joined on May 2010
@ Holland
|
#7
|
void wallPaeper::manBtnClicked() { if(openManWin == true) { openManWin = false; manWin = new wpManager(this); manWin->setAttribute(Qt::WA_Maemo5StackedWindow); manWin->setAttribute(Qt::WA_DeleteOnClose); connect(manWin, SIGNAL(destroyed()), this, SLOT(openManWinTrue())); manWin->show(); } } void wallPaeper::openManWinTrue() { openManWin = true; }
It's possible to open multiple windows after pressing a button more than once.
How can I make sure a button can only be pressed once? (or how can I make sure only one window is opened?)
I've tried: (after button press)
- Disable button before creating a new Manager window (but that seemed to go simultaneously, so the button was disabled just before or after the new window shows)
- Disable the button, if(disabled) - open window (same as above, strange..)
- A boolean that decides whether to open it or not (false if button pressed)
- disconnect() after button press
- if a Manager window is made, don't make it again (didn't work..)
None of these worked
It doesn't crash with multiple windows, there are just multiple windows without a parent window
So can anyone help me with either:
- Preventing double button press
- Setting QListWidget icons faster
Many thanks in advance!
Wallpaeper - Desktop background manager (in Extras!)
Config Reader - Export all Gconf to an HTML file + compare feature (Extras-testing)
Even though these programs are available for free, I would appreciate any donations
Last edited by Berserk; 2010-09-27 at 19:20. Reason: Added [SOLVED] to title